OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_WINDOW_MANAGER_H_ | 5 #ifndef ASH_MUS_WINDOW_MANAGER_H_ |
6 #define ASH_MUS_WINDOW_MANAGER_H_ | 6 #define ASH_MUS_WINDOW_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 class AcceleratorHandler; | 60 class AcceleratorHandler; |
61 class WmTestHelper; | 61 class WmTestHelper; |
62 | 62 |
63 // WindowManager serves as the WindowManagerDelegate and | 63 // WindowManager serves as the WindowManagerDelegate and |
64 // WindowTreeClientDelegate for mash. WindowManager creates (and owns) | 64 // WindowTreeClientDelegate for mash. WindowManager creates (and owns) |
65 // a RootWindowController per Display. WindowManager takes ownership of | 65 // a RootWindowController per Display. WindowManager takes ownership of |
66 // the WindowTreeClient. | 66 // the WindowTreeClient. |
67 class WindowManager : public aura::WindowManagerDelegate, | 67 class WindowManager : public aura::WindowManagerDelegate, |
68 public aura::WindowTreeClientDelegate { | 68 public aura::WindowTreeClientDelegate { |
69 public: | 69 public: |
70 WindowManager(service_manager::Connector* connector, Config config); | 70 // Set |show_primary_host_on_connect| to true if the initial display should |
| 71 // be made visible. Generally tests should use false, other places use true. |
| 72 WindowManager(service_manager::Connector* connector, |
| 73 Config config, |
| 74 bool show_primary_host_on_connect); |
71 ~WindowManager() override; | 75 ~WindowManager() override; |
72 | 76 |
73 void Init(std::unique_ptr<aura::WindowTreeClient> window_tree_client, | 77 void Init(std::unique_ptr<aura::WindowTreeClient> window_tree_client, |
74 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool, | 78 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool, |
75 std::unique_ptr<ash::ShellDelegate> shell_delegate = nullptr); | 79 std::unique_ptr<ash::ShellDelegate> shell_delegate = nullptr); |
76 | 80 |
77 // Blocks waiting for the initial set of displays. | 81 // Blocks waiting for the initial set of displays. |
78 bool WaitForInitialDisplays(); | 82 bool WaitForInitialDisplays(); |
79 | 83 |
80 // Called during shutdown to delete all the RootWindowControllers. | 84 // Called during shutdown to delete all the RootWindowControllers. |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 const gfx::Insets& insets, | 194 const gfx::Insets& insets, |
191 const std::vector<gfx::Rect>& additional_client_areas) override; | 195 const std::vector<gfx::Rect>& additional_client_areas) override; |
192 bool IsWindowActive(aura::Window* window) override; | 196 bool IsWindowActive(aura::Window* window) override; |
193 void OnWmDeactivateWindow(aura::Window* window) override; | 197 void OnWmDeactivateWindow(aura::Window* window) override; |
194 | 198 |
195 service_manager::Connector* connector_; | 199 service_manager::Connector* connector_; |
196 display::mojom::DisplayControllerPtr display_controller_; | 200 display::mojom::DisplayControllerPtr display_controller_; |
197 | 201 |
198 const Config config_; | 202 const Config config_; |
199 | 203 |
| 204 const bool show_primary_host_on_connect_; |
| 205 |
200 std::unique_ptr<::wm::WMState> wm_state_; | 206 std::unique_ptr<::wm::WMState> wm_state_; |
201 std::unique_ptr<aura::PropertyConverter> property_converter_; | 207 std::unique_ptr<aura::PropertyConverter> property_converter_; |
202 | 208 |
203 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; | 209 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; |
204 | 210 |
205 aura::WindowManagerClient* window_manager_client_ = nullptr; | 211 aura::WindowManagerClient* window_manager_client_ = nullptr; |
206 | 212 |
207 std::unique_ptr<views::PointerWatcherEventRouter> | 213 std::unique_ptr<views::PointerWatcherEventRouter> |
208 pointer_watcher_event_router_; | 214 pointer_watcher_event_router_; |
209 | 215 |
(...skipping 21 matching lines...) Expand all Loading... |
231 | 237 |
232 std::unique_ptr<ui::InputDeviceClient> input_device_client_; | 238 std::unique_ptr<ui::InputDeviceClient> input_device_client_; |
233 | 239 |
234 DISALLOW_COPY_AND_ASSIGN(WindowManager); | 240 DISALLOW_COPY_AND_ASSIGN(WindowManager); |
235 }; | 241 }; |
236 | 242 |
237 } // namespace mus | 243 } // namespace mus |
238 } // namespace ash | 244 } // namespace ash |
239 | 245 |
240 #endif // ASH_MUS_WINDOW_MANAGER_H_ | 246 #endif // ASH_MUS_WINDOW_MANAGER_H_ |
OLD | NEW |