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

Side by Side Diff: content/browser/renderer_host/text_input_manager.cc

Issue 2098353005: Implement RenderWidgetHostViewBase::ImeCancelComposition for all Views (Aura Only) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/text_input_manager.h" 5 #include "content/browser/renderer_host/text_input_manager.h"
6 6
7 #include "content/browser/renderer_host/render_widget_host_impl.h" 7 #include "content/browser/renderer_host/render_widget_host_impl.h"
8 #include "content/browser/renderer_host/render_widget_host_view_base.h" 8 #include "content/browser/renderer_host/render_widget_host_view_base.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 active_view_ = view; 71 active_view_ = view;
72 72
73 // If the state for |active_view_| is none, then we no longer have an 73 // If the state for |active_view_| is none, then we no longer have an
74 // |active_view_|. 74 // |active_view_|.
75 if (active_view_ == view && text_input_state.type == ui::TEXT_INPUT_TYPE_NONE) 75 if (active_view_ == view && text_input_state.type == ui::TEXT_INPUT_TYPE_NONE)
76 active_view_ = nullptr; 76 active_view_ = nullptr;
77 77
78 NotifyObserversAboutInputStateUpdate(view, changed); 78 NotifyObserversAboutInputStateUpdate(view, changed);
79 } 79 }
80 80
81 void TextInputManager::ImeCancelComposition(RenderWidgetHostViewBase* view) {
82 DCHECK(IsRegistered(view));
83 FOR_EACH_OBSERVER(Observer, observer_list_,
84 OnImeCancelComposition(this, view));
85 }
86
81 void TextInputManager::Register(RenderWidgetHostViewBase* view) { 87 void TextInputManager::Register(RenderWidgetHostViewBase* view) {
82 DCHECK(!IsRegistered(view)); 88 DCHECK(!IsRegistered(view));
83 89
84 text_input_state_map_[view] = TextInputState(); 90 text_input_state_map_[view] = TextInputState();
85 } 91 }
86 92
87 void TextInputManager::Unregister(RenderWidgetHostViewBase* view) { 93 void TextInputManager::Unregister(RenderWidgetHostViewBase* view) {
88 DCHECK(IsRegistered(view)); 94 DCHECK(IsRegistered(view));
89 95
90 text_input_state_map_.erase(view); 96 text_input_state_map_.erase(view);
(...skipping 18 matching lines...) Expand all
109 115
110 void TextInputManager::NotifyObserversAboutInputStateUpdate( 116 void TextInputManager::NotifyObserversAboutInputStateUpdate(
111 RenderWidgetHostViewBase* updated_view, 117 RenderWidgetHostViewBase* updated_view,
112 bool did_update_state) { 118 bool did_update_state) {
113 FOR_EACH_OBSERVER( 119 FOR_EACH_OBSERVER(
114 Observer, observer_list_, 120 Observer, observer_list_,
115 OnUpdateTextInputStateCalled(this, updated_view, did_update_state)); 121 OnUpdateTextInputStateCalled(this, updated_view, did_update_state));
116 } 122 }
117 123
118 } // namespace content 124 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698