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

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

Issue 2098353005: Implement RenderWidgetHostViewBase::ImeCancelComposition for all Views (Aura Only) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the Incorrect DCHECK_EQ Created 4 years, 6 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 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:

Powered by Google App Engine
This is Rietveld 408576698