OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/views/test/views_test_helper_aura.h" | 5 #include "ui/views/test/views_test_helper_aura.h" |
6 | 6 |
7 #include "ui/aura/client/screen_position_client.h" | 7 #include "ui/aura/client/screen_position_client.h" |
8 #include "ui/aura/test/aura_test_helper.h" | 8 #include "ui/aura/test/aura_test_helper.h" |
9 #include "ui/views/test/platform_test_helper.h" | 9 #include "ui/views/test/platform_test_helper.h" |
10 #include "ui/wm/core/capture_controller.h" | 10 #include "ui/wm/core/capture_controller.h" |
11 #include "ui/wm/core/default_activation_client.h" | 11 #include "ui/wm/core/default_activation_client.h" |
12 #include "ui/wm/core/default_screen_position_client.h" | 12 #include "ui/wm/core/default_screen_position_client.h" |
13 | 13 |
14 namespace views { | 14 namespace views { |
15 | 15 |
16 // static | 16 // static |
17 ViewsTestHelper* ViewsTestHelper::Create( | 17 ViewsTestHelper* ViewsTestHelper::Create( |
18 base::MessageLoopForUI* message_loop, | |
19 ui::ContextFactory* context_factory, | 18 ui::ContextFactory* context_factory, |
20 ui::ContextFactoryPrivate* context_factory_private) { | 19 ui::ContextFactoryPrivate* context_factory_private) { |
21 return new ViewsTestHelperAura(message_loop, context_factory, | 20 return new ViewsTestHelperAura(context_factory, context_factory_private); |
22 context_factory_private); | |
23 } | 21 } |
24 | 22 |
25 ViewsTestHelperAura::ViewsTestHelperAura( | 23 ViewsTestHelperAura::ViewsTestHelperAura( |
26 base::MessageLoopForUI* message_loop, | |
27 ui::ContextFactory* context_factory, | 24 ui::ContextFactory* context_factory, |
28 ui::ContextFactoryPrivate* context_factory_private) | 25 ui::ContextFactoryPrivate* context_factory_private) |
29 : context_factory_(context_factory), | 26 : context_factory_(context_factory), |
30 context_factory_private_(context_factory_private) { | 27 context_factory_private_(context_factory_private) { |
31 aura_test_helper_.reset(new aura::test::AuraTestHelper(message_loop)); | 28 aura_test_helper_.reset(new aura::test::AuraTestHelper()); |
32 } | 29 } |
33 | 30 |
34 ViewsTestHelperAura::~ViewsTestHelperAura() { | 31 ViewsTestHelperAura::~ViewsTestHelperAura() { |
35 } | 32 } |
36 | 33 |
37 void ViewsTestHelperAura::EnableMusWithWindowTreeClient( | 34 void ViewsTestHelperAura::EnableMusWithWindowTreeClient( |
38 aura::WindowTreeClient* window_tree_client) { | 35 aura::WindowTreeClient* window_tree_client) { |
39 aura_test_helper_->EnableMusWithWindowTreeClient(window_tree_client); | 36 aura_test_helper_->EnableMusWithWindowTreeClient(window_tree_client); |
40 } | 37 } |
41 | 38 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // single display that is intended for an ash like environment. Such a | 81 // single display that is intended for an ash like environment. Such a |
85 // configuration doesn't make sense for aura-mus-client, where it's testing | 82 // configuration doesn't make sense for aura-mus-client, where it's testing |
86 // DesktopNativeWidgetAura. | 83 // DesktopNativeWidgetAura. |
87 return nullptr; | 84 return nullptr; |
88 } | 85 } |
89 | 86 |
90 return aura_test_helper_->root_window(); | 87 return aura_test_helper_->root_window(); |
91 } | 88 } |
92 | 89 |
93 } // namespace views | 90 } // namespace views |
OLD | NEW |