Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MASH_WM_TEST_WM_TEST_HELPER_H_ | |
| 6 #define MASH_WM_TEST_WM_TEST_HELPER_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "components/mus/public/cpp/tests/test_window_tree_connection_setup.h" | |
| 12 #include "mash/wm/window_manager_application.h" | |
| 13 #include "ui/gfx/native_widget_types.h" | |
|
James Cook
2016/05/19 05:08:22
Is this needed?
sky
2016/05/19 15:14:24
Done.
| |
| 14 #include "ui/wm/public/window_types.h" | |
|
James Cook
2016/05/19 05:08:22
ditto
sky
2016/05/19 15:14:24
Done.
| |
| 15 | |
| 16 namespace base { | |
| 17 class MessageLoop; | |
| 18 } | |
| 19 | |
| 20 namespace gfx { | |
| 21 class Rect; | |
| 22 } | |
| 23 | |
| 24 namespace mus { | |
| 25 class Window; | |
| 26 } | |
| 27 | |
| 28 namespace mash { | |
| 29 namespace wm { | |
| 30 | |
| 31 class WmTestScreen; | |
| 32 | |
| 33 // WMTestHelper is responsible for configuring a WindowTreeConnection that | |
| 34 // does not talk to mus. Additionally a test Screen (WmTestScreen) is created. | |
| 35 class WmTestHelper { | |
| 36 public: | |
| 37 WmTestHelper(); | |
| 38 ~WmTestHelper(); | |
| 39 | |
| 40 void Init(); | |
| 41 | |
| 42 WindowManagerApplication* window_manager_app() { | |
| 43 return &window_manager_app_; | |
| 44 } | |
| 45 | |
| 46 WmTestScreen* screen() { return screen_; } | |
| 47 | |
| 48 private: | |
| 49 std::unique_ptr<base::MessageLoop> message_loop_; | |
| 50 mus::TestWindowTreeConnectionSetup window_tree_connection_setup_; | |
| 51 WindowManagerApplication window_manager_app_; | |
| 52 WmTestScreen* screen_ = nullptr; // Owned by |window_manager_app_|. | |
| 53 | |
| 54 DISALLOW_COPY_AND_ASSIGN(WmTestHelper); | |
| 55 }; | |
| 56 | |
| 57 } // namespace wm | |
| 58 } // namespace mash | |
| 59 | |
| 60 #endif // MASH_WM_TEST_WM_TEST_HELPER_H_ | |
| OLD | NEW |