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

Side by Side Diff: chrome/browser/chromeos/input_method/textinput_test_helper.cc

Issue 1155013005: Refactoring the ownership of ui::InputMethod. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pls be green! Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "base/strings/string_number_conversions.h" 6 #include "base/strings/string_number_conversions.h"
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/chromeos/input_method/textinput_test_helper.h" 9 #include "chrome/browser/chromeos/input_method/textinput_test_helper.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/test/base/interactive_test_utils.h" 11 #include "chrome/test/base/interactive_test_utils.h"
12 #include "content/public/browser/render_view_host.h" 12 #include "content/public/browser/render_view_host.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "content/public/test/browser_test_utils.h" 14 #include "content/public/test/browser_test_utils.h"
15 #include "ui/aura/client/aura_constants.h" 15 #include "ui/aura/client/aura_constants.h"
James Cook 2015/06/01 22:21:00 Here and elsewhere that you've removed aura::clien
Shu Chen 2015/06/02 04:11:16 Done.
16 #include "ui/aura/window_event_dispatcher.h" 16 #include "ui/aura/window_event_dispatcher.h"
17 #include "ui/aura/window_tree_host.h"
17 #include "ui/base/ime/input_method_factory.h" 18 #include "ui/base/ime/input_method_factory.h"
18 19
19 namespace chromeos { 20 namespace chromeos {
20 namespace { 21 namespace {
21 ui::MockInputMethod* GetInputMethod() { 22 ui::MockInputMethod* GetInputMethod() {
22 ui::MockInputMethod* input_method = static_cast<ui::MockInputMethod*>( 23 ui::MockInputMethod* input_method = static_cast<ui::MockInputMethod*>(
23 ash::Shell::GetPrimaryRootWindow()->GetProperty( 24 ash::Shell::GetPrimaryRootWindow()->GetHost()->GetInputMethod());
24 aura::client::kRootWindowInputMethodKey));
25 CHECK(input_method); 25 CHECK(input_method);
26 return input_method; 26 return input_method;
27 } 27 }
28 } // namespace 28 } // namespace
29 29
30 void TextInputTestBase::SetUpInProcessBrowserTestFixture() { 30 void TextInputTestBase::SetUpInProcessBrowserTestFixture() {
31 ui::SetUpInputMethodFactoryForTesting(); 31 ui::SetUpInputMethodFactoryForTesting();
32 } 32 }
33 33
34 TextInputTestHelper::TextInputTestHelper() 34 TextInputTestHelper::TextInputTestHelper()
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 mouse_event.y = rect.CenterPoint().y(); 201 mouse_event.y = rect.CenterPoint().y();
202 mouse_event.clickCount = 1; 202 mouse_event.clickCount = 1;
203 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); 203 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
204 204
205 mouse_event.type = blink::WebInputEvent::MouseUp; 205 mouse_event.type = blink::WebInputEvent::MouseUp;
206 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); 206 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
207 return true; 207 return true;
208 } 208 }
209 209
210 } // namespace chromeos 210 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698