Chromium Code Reviews| 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 ASH_MUS_TEST_WM_TEST_HELPER_H_ | 5 #ifndef ASH_MUS_TEST_WM_TEST_HELPER_H_ |
| 6 #define ASH_MUS_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 "ash/mus/window_manager_application.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 } | 44 } |
| 45 | 45 |
| 46 // Returns the RootWindowControllers ordered by display id (which we assume | 46 // Returns the RootWindowControllers ordered by display id (which we assume |
| 47 // correlates with creation order). | 47 // correlates with creation order). |
| 48 std::vector<RootWindowController*> GetRootsOrderedByDisplayId(); | 48 std::vector<RootWindowController*> GetRootsOrderedByDisplayId(); |
| 49 | 49 |
| 50 void UpdateDisplay(const std::string& display_spec); | 50 void UpdateDisplay(const std::string& display_spec); |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 // Creates a new RootWindowController given |display_spec|, which is the | 53 // Creates a new RootWindowController given |display_spec|, which is the |
| 54 // configuration of the display. | 54 // configuration of the display. |
|
James Cook
2016/09/21 22:03:19
nit: Document |next_x| here and below.
Or conside
sky
2016/09/21 22:47:49
Done.
| |
| 55 RootWindowController* CreateRootWindowController( | 55 RootWindowController* CreateRootWindowController( |
| 56 const std::string& display_spec); | 56 const std::string& display_spec, |
| 57 int* next_x); | |
| 57 | 58 |
| 58 // Updates the display of an existing RootWindowController. | 59 // Updates the display of an existing RootWindowController. |
| 59 void UpdateDisplay(RootWindowController* root_window_controller, | 60 void UpdateDisplay(RootWindowController* root_window_controller, |
| 60 const std::string& display_spec); | 61 const std::string& display_spec, |
| 62 int* next_x); | |
| 61 | 63 |
| 62 // Destroys a RootWindowController. | 64 // Destroys a RootWindowController. |
| 63 void DestroyRootWindowController( | 65 void DestroyRootWindowController( |
| 64 RootWindowController* root_window_controller); | 66 RootWindowController* root_window_controller); |
| 65 | 67 |
| 66 std::unique_ptr<base::MessageLoop> message_loop_; | 68 std::unique_ptr<base::MessageLoop> message_loop_; |
| 67 ui::TestWindowTreeClientSetup window_tree_client_setup_; | 69 ui::TestWindowTreeClientSetup window_tree_client_setup_; |
| 68 std::unique_ptr<WindowManagerApplication> window_manager_app_; | 70 std::unique_ptr<WindowManagerApplication> window_manager_app_; |
| 69 std::unique_ptr<ui::WindowTreeClientPrivate> window_tree_client_private_; | 71 std::unique_ptr<ui::WindowTreeClientPrivate> window_tree_client_private_; |
| 70 | 72 |
| 71 // Id for the next Display created by CreateRootWindowController(). | 73 // Id for the next Display created by CreateRootWindowController(). |
| 72 int64_t next_display_id_ = 1; | 74 int64_t next_display_id_ = 1; |
| 73 | 75 |
| 74 std::unique_ptr<base::SequencedWorkerPoolOwner> blocking_pool_owner_; | 76 std::unique_ptr<base::SequencedWorkerPoolOwner> blocking_pool_owner_; |
| 75 | 77 |
| 76 DISALLOW_COPY_AND_ASSIGN(WmTestHelper); | 78 DISALLOW_COPY_AND_ASSIGN(WmTestHelper); |
| 77 }; | 79 }; |
| 78 | 80 |
| 79 } // namespace mus | 81 } // namespace mus |
| 80 } // namespace ash | 82 } // namespace ash |
| 81 | 83 |
| 82 #endif // ASH_MUS_TEST_WM_TEST_HELPER_H_ | 84 #endif // ASH_MUS_TEST_WM_TEST_HELPER_H_ |
| OLD | NEW |