Send TextInputTypeChanged IPC regardless of the activities of an IME on Windows

On Windows, we need to allow RenderWidget to send TextInputTypeChanged IPC
regardless of |input_method_is_active_| so that on-screen keyboard can show some
optimized layout based on the current TextInputType focused in the web content.

This CL should have no performance regression on Windows Vista and later,
where |RenderWidget::input_method_is_active_| is always set to true
while RWHVW or RWHVA has input focus regardless of the activities of an IME.
See http://crbug.com/296509 for the background.

This CL uses a bit ad-hoc way but I hope we can revisit here soon after
Win-Aura is successfully landed.

BUG=296505, 296509
TEST=manually done with aura/non-aura on Windows 8.1

Review URL: https://chromiumcodereview.appspot.com/23600069

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224904 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index fd217624..e482e0a2 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -2176,8 +2176,16 @@
 }
 
 void RenderWidget::UpdateTextInputType() {
+  // On Windows, not only an IME but also an on-screen keyboard relies on the
+  // latest TextInputType to optimize its layout and functionality. Thus
+  // |input_method_is_active_| is no longer an appropriate condition to suppress
+  // TextInputTypeChanged IPC on Windows.
+  // TODO(yukawa, yoichio): Consider to stop checking |input_method_is_active_|
+  // on other platforms as well as Windows if the overhead is acceptable.
+#if !defined(OS_WIN)
   if (!input_method_is_active_)
     return;
+#endif
 
   ui::TextInputType new_type = GetTextInputType();
   if (IsDateTimeInput(new_type))