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

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

Issue 2054163003: Fix SitePerProcessTextInputManagerTest.StopTrackingCrashedChildFrame on CFI Bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing sky@'s comments 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 void TextInputManager::AddObserver(Observer* observer) { 102 void TextInputManager::AddObserver(Observer* observer) {
103 observer_list_.AddObserver(observer); 103 observer_list_.AddObserver(observer);
104 } 104 }
105 105
106 void TextInputManager::RemoveObserver(Observer* observer) { 106 void TextInputManager::RemoveObserver(Observer* observer) {
107 observer_list_.RemoveObserver(observer); 107 observer_list_.RemoveObserver(observer);
108 } 108 }
109 109
110 size_t TextInputManager::GetRegisteredViewsCountForTesting() {
111 return text_input_state_map_.size();
112 }
113
114 ui::TextInputType TextInputManager::GetTextInputTypeForViewForTesting(
115 RenderWidgetHostViewBase* view) {
116 DCHECK(IsRegistered(view));
117 return text_input_state_map_[view].type;
118 }
119
110 void TextInputManager::NotifyObserversAboutInputStateUpdate( 120 void TextInputManager::NotifyObserversAboutInputStateUpdate(
111 RenderWidgetHostViewBase* updated_view, 121 RenderWidgetHostViewBase* updated_view,
112 bool did_update_state) { 122 bool did_update_state) {
113 FOR_EACH_OBSERVER( 123 FOR_EACH_OBSERVER(
114 Observer, observer_list_, 124 Observer, observer_list_,
115 OnUpdateTextInputStateCalled(this, updated_view, did_update_state)); 125 OnUpdateTextInputStateCalled(this, updated_view, did_update_state));
116 } 126 }
117 127
118 } // namespace content 128 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/text_input_manager.h ('k') | content/public/test/text_input_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698