Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 29943002: Limit display of the virtual keyboard to state changes triggered from a user gesture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address reviewer feedback. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index a8eb716f9c55ebab17abd807fac033fecef3795b..0ae793fec9e50b95b361a9adbd09848fa9df7e46 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -494,6 +494,19 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host)
////////////////////////////////////////////////////////////////////////////////
// RenderWidgetHostViewAura, RenderWidgetHostView implementation:
+bool RenderWidgetHostViewAura::OnMessageReceived(
+ const IPC::Message& message) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewAura, message)
+ // TODO(kevers): Move to RenderWidgetHostViewImpl and consolidate IPC
+ // messages for TextInput<State|Type>Changed.
sadrul 2014/01/10 19:53:21 Please also mention in the comment that the corres
kevers 2014/01/13 16:59:10 Done.
+ IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
+ OnTextInputStateChanged)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
void RenderWidgetHostViewAura::InitAsChild(
gfx::NativeView parent_view) {
window_->Init(ui::LAYER_TEXTURED);
@@ -904,6 +917,14 @@ void RenderWidgetHostViewAura::TextInputTypeChanged(
}
}
+void RenderWidgetHostViewAura::OnTextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) {
+ if (params.show_ime_if_needed && params.type != ui::TEXT_INPUT_TYPE_NONE) {
+ if (GetInputMethod())
+ GetInputMethod()->ShowImeIfNeeded();
+ }
+}
+
void RenderWidgetHostViewAura::ImeCancelComposition() {
if (GetInputMethod())
GetInputMethod()->CancelComposition(this);

Powered by Google App Engine
This is Rietveld 408576698