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

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

Issue 2229223002: Route IME-related IPCs to the active/focused RenderWidget (Mac) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed erickchen@ comments + Making RWHVMacTest -> InputMethodMacTest. Created 4 years, 4 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
« no previous file with comments | « content/browser/renderer_host/text_input_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "content/browser/renderer_host/render_widget_host_impl.h" 8 #include "content/browser/renderer_host/render_widget_host_impl.h"
9 #include "content/browser/renderer_host/render_widget_host_view_base.h" 9 #include "content/browser/renderer_host/render_widget_host_view_base.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } 259 }
260 260
261 void TextInputManager::AddObserver(Observer* observer) { 261 void TextInputManager::AddObserver(Observer* observer) {
262 observer_list_.AddObserver(observer); 262 observer_list_.AddObserver(observer);
263 } 263 }
264 264
265 void TextInputManager::RemoveObserver(Observer* observer) { 265 void TextInputManager::RemoveObserver(Observer* observer) {
266 observer_list_.RemoveObserver(observer); 266 observer_list_.RemoveObserver(observer);
267 } 267 }
268 268
269 bool TextInputManager::HasObserver(Observer* observer) const {
270 return observer_list_.HasObserver(observer);
271 }
272
269 size_t TextInputManager::GetRegisteredViewsCountForTesting() { 273 size_t TextInputManager::GetRegisteredViewsCountForTesting() {
270 return text_input_state_map_.size(); 274 return text_input_state_map_.size();
271 } 275 }
272 276
273 ui::TextInputType TextInputManager::GetTextInputTypeForViewForTesting( 277 ui::TextInputType TextInputManager::GetTextInputTypeForViewForTesting(
274 RenderWidgetHostViewBase* view) { 278 RenderWidgetHostViewBase* view) {
275 DCHECK(IsRegistered(view)); 279 DCHECK(IsRegistered(view));
276 return text_input_state_map_[view].type; 280 return text_input_state_map_[view].type;
277 } 281 }
278 282
(...skipping 19 matching lines...) Expand all
298 302
299 TextInputManager::TextSelection::TextSelection() 303 TextInputManager::TextSelection::TextSelection()
300 : offset(0), range(gfx::Range::InvalidRange()), text(base::string16()) {} 304 : offset(0), range(gfx::Range::InvalidRange()), text(base::string16()) {}
301 305
302 TextInputManager::TextSelection::TextSelection(const TextSelection& other) = 306 TextInputManager::TextSelection::TextSelection(const TextSelection& other) =
303 default; 307 default;
304 308
305 TextInputManager::TextSelection::~TextSelection() {} 309 TextInputManager::TextSelection::~TextSelection() {}
306 310
307 } // namespace content 311 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/text_input_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698