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