| Index: chrome/browser/renderer_host/render_widget_host_view_win.cc
|
| ===================================================================
|
| --- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 96328)
|
| +++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
|
| @@ -209,6 +209,11 @@
|
| return ::DefWindowProc(window, message, wparam, lparam);
|
| }
|
|
|
| +bool ShouldEnableIME(ui::TextInputType type) {
|
| + return type != ui::TEXT_INPUT_TYPE_NONE &&
|
| + type != ui::TEXT_INPUT_TYPE_PASSWORD;
|
| +}
|
| +
|
| } // namespace
|
|
|
| // RenderWidgetHostView --------------------------------------------------------
|
| @@ -287,6 +292,10 @@
|
| tab_switch_paint_time_ = TimeTicks::Now();
|
| is_hidden_ = false;
|
| EnsureTooltip();
|
| + if (ShouldEnableIME(text_input_type_))
|
| + ime_input_.EnableIME(m_hWnd);
|
| + else
|
| + ime_input_.DisableIME(m_hWnd);
|
| render_widget_host_->WasRestored();
|
| }
|
|
|
| @@ -598,8 +607,7 @@
|
| // as true. We need to support "can_compose_inline=false" for PPAPI plugins
|
| // that may want to avoid drawing composition-text by themselves and pass
|
| // the responsibility to the browser.
|
| - bool is_enabled = (type != ui::TEXT_INPUT_TYPE_NONE &&
|
| - type != ui::TEXT_INPUT_TYPE_PASSWORD);
|
| + bool is_enabled = ShouldEnableIME(type);
|
| if (text_input_type_ != type) {
|
| text_input_type_ = type;
|
| if (is_enabled)
|
|
|