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 83f8b72e9e5f6da780e6f80d54117f53f394f718..f32a160fd36634978a9a359fab36757b551132f1 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -977,12 +977,6 @@ void RenderWidgetHostViewAura::SetIsLoading(bool is_loading) { |
UpdateCursorIfOverSelf(); |
} |
-void RenderWidgetHostViewAura::ImeCancelComposition() { |
- if (GetInputMethod()) |
- GetInputMethod()->CancelComposition(this); |
- has_composition_text_ = false; |
-} |
- |
void RenderWidgetHostViewAura::ImeCompositionRangeChanged( |
const gfx::Range& range, |
const std::vector<gfx::Rect>& character_bounds) { |
@@ -3030,6 +3024,18 @@ void RenderWidgetHostViewAura::OnUpdateTextInputStateCalled( |
GetInputMethod()->ShowImeIfNeeded(); |
} |
+void RenderWidgetHostViewAura::OnImeCancelComposition( |
+ TextInputManager* text_input_manager, |
+ RenderWidgetHostViewBase* view) { |
+ // |view| is not necessarily the one corresponding to |
+ // TextInputManager::GetActiveWidget() as RenderWidgetHostViewAura can call |
+ // this method to finish any ongoing composition in response to a mouse down |
+ // event. |
+ if (GetInputMethod()) |
+ GetInputMethod()->CancelComposition(this); |
+ has_composition_text_ = false; |
+} |
+ |
//////////////////////////////////////////////////////////////////////////////// |
// RenderWidgetHostViewBase, public: |