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

Side by Side Diff: content/public/test/text_input_test_utils.cc

Issue 2323983003: DO NOT SUBMIT: Bundle IME-related messages into one for batch edit (Closed)
Patch Set: fixed nits and fixed blimp test Created 4 years, 3 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/public/browser/render_widget_host.h ('k') | content/renderer/render_frame_impl.h » ('j') | 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/public/test/text_input_test_utils.h" 5 #include "content/public/test/text_input_test_utils.h"
6 6
7 #include <unordered_set> 7 #include <unordered_set>
8 8
9 #include "content/browser/renderer_host/render_widget_host_impl.h" 9 #include "content/browser/renderer_host/render_widget_host_impl.h"
10 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 10 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 244
245 return true; 245 return true;
246 } 246 }
247 247
248 bool RequestCompositionInfoFromActiveWidget(WebContents* web_contents) { 248 bool RequestCompositionInfoFromActiveWidget(WebContents* web_contents) {
249 TextInputManager* manager = 249 TextInputManager* manager =
250 static_cast<WebContentsImpl*>(web_contents)->GetTextInputManager(); 250 static_cast<WebContentsImpl*>(web_contents)->GetTextInputManager();
251 if (!manager || !manager->GetActiveWidget()) 251 if (!manager || !manager->GetActiveWidget())
252 return false; 252 return false;
253 253
254 manager->GetActiveWidget()->Send(new InputMsg_RequestCompositionUpdate( 254 manager->GetActiveWidget()->Send(new InputMsg_ImeRequestCompositionUpdate(
255 manager->GetActiveWidget()->GetRoutingID(), true, false)); 255 manager->GetActiveWidget()->GetRoutingID(), true, false));
256 return true; 256 return true;
257 } 257 }
258 258
259 size_t GetRegisteredViewsCountFromTextInputManager(WebContents* web_contents) { 259 size_t GetRegisteredViewsCountFromTextInputManager(WebContents* web_contents) {
260 std::unordered_set<RenderWidgetHostView*> views; 260 std::unordered_set<RenderWidgetHostView*> views;
261 TextInputManager* manager = 261 TextInputManager* manager =
262 static_cast<WebContentsImpl*>(web_contents)->GetTextInputManager(); 262 static_cast<WebContentsImpl*>(web_contents)->GetTextInputManager();
263 return !!manager ? manager->GetRegisteredViewsCountForTesting() : 0; 263 return !!manager ? manager->GetRegisteredViewsCountForTesting() : 0;
264 } 264 }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 #ifdef USE_AURA 406 #ifdef USE_AURA
407 RenderWidgetHostViewAura* view = static_cast<RenderWidgetHostViewAura*>( 407 RenderWidgetHostViewAura* view = static_cast<RenderWidgetHostViewAura*>(
408 web_contents->GetRenderWidgetHostView()); 408 web_contents->GetRenderWidgetHostView());
409 observer.reset(new InputMethodObserverAura(view->GetInputMethod())); 409 observer.reset(new InputMethodObserverAura(view->GetInputMethod()));
410 #endif 410 #endif
411 return observer; 411 return observer;
412 } 412 }
413 413
414 } // namespace content 414 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/render_widget_host.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698