OLD | NEW |
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 #ifndef MASH_WM_TEST_WM_TEST_HELPER_H_ | 5 #ifndef ASH_MUS_TEST_WM_TEST_HELPER_H_ |
6 #define MASH_WM_TEST_WM_TEST_HELPER_H_ | 6 #define ASH_MUS_TEST_WM_TEST_HELPER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
| 10 #include "ash/mus/window_manager_application.h" |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "components/mus/public/cpp/tests/test_window_tree_client_setup.h" | 12 #include "components/mus/public/cpp/tests/test_window_tree_client_setup.h" |
12 #include "mash/wm/window_manager_application.h" | |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 class MessageLoop; | 15 class MessageLoop; |
16 } | 16 } |
17 | 17 |
18 namespace gfx { | 18 namespace gfx { |
19 class Rect; | 19 class Rect; |
20 } | 20 } |
21 | 21 |
22 namespace mus { | 22 namespace mus { |
23 class Window; | 23 class Window; |
24 } | 24 } |
25 | 25 |
26 namespace mash { | 26 namespace ash { |
27 namespace wm { | 27 namespace mus { |
28 | 28 |
29 class WmTestScreen; | 29 class WmTestScreen; |
30 | 30 |
31 // WMTestHelper is responsible for configuring a WindowTreeClient that | 31 // WMTestHelper is responsible for configuring a WindowTreeClient that |
32 // does not talk to mus. Additionally a test Screen (WmTestScreen) is created. | 32 // does not talk to mus. Additionally a test Screen (WmTestScreen) is created. |
33 class WmTestHelper { | 33 class WmTestHelper { |
34 public: | 34 public: |
35 WmTestHelper(); | 35 WmTestHelper(); |
36 ~WmTestHelper(); | 36 ~WmTestHelper(); |
37 | 37 |
38 void Init(); | 38 void Init(); |
39 | 39 |
40 WindowManagerApplication* window_manager_app() { | 40 WindowManagerApplication* window_manager_app() { |
41 return &window_manager_app_; | 41 return &window_manager_app_; |
42 } | 42 } |
43 | 43 |
44 WmTestScreen* screen() { return screen_; } | 44 WmTestScreen* screen() { return screen_; } |
45 | 45 |
46 private: | 46 private: |
47 std::unique_ptr<base::MessageLoop> message_loop_; | 47 std::unique_ptr<base::MessageLoop> message_loop_; |
48 mus::TestWindowTreeClientSetup window_tree_client_setup_; | 48 ::mus::TestWindowTreeClientSetup window_tree_client_setup_; |
49 WindowManagerApplication window_manager_app_; | 49 WindowManagerApplication window_manager_app_; |
50 WmTestScreen* screen_ = nullptr; // Owned by |window_manager_app_|. | 50 WmTestScreen* screen_ = nullptr; // Owned by |window_manager_app_|. |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(WmTestHelper); | 52 DISALLOW_COPY_AND_ASSIGN(WmTestHelper); |
53 }; | 53 }; |
54 | 54 |
55 } // namespace wm | 55 } // namespace mus |
56 } // namespace mash | 56 } // namespace ash |
57 | 57 |
58 #endif // MASH_WM_TEST_WM_TEST_HELPER_H_ | 58 #endif // ASH_MUS_TEST_WM_TEST_HELPER_H_ |
OLD | NEW |