| 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> |
| 11 #include <set> | 11 #include <set> |
| 12 | 12 |
| 13 #include "ash/root_window_controller.h" | 13 #include "ash/root_window_controller.h" |
| 14 #include "ash/shell_delegate.h" | 14 #include "ash/shell_delegate.h" |
| 15 #include "base/callback_forward.h" |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 17 #include "services/ui/common/types.h" | 18 #include "services/ui/common/types.h" |
| 18 #include "services/ui/public/interfaces/display/display_controller.mojom.h" | 19 #include "services/ui/public/interfaces/display/display_controller.mojom.h" |
| 19 #include "services/ui/public/interfaces/window_manager.mojom.h" | 20 #include "services/ui/public/interfaces/window_manager.mojom.h" |
| 20 #include "ui/aura/mus/window_manager_delegate.h" | 21 #include "ui/aura/mus/window_manager_delegate.h" |
| 21 #include "ui/aura/mus/window_tree_client_delegate.h" | 22 #include "ui/aura/mus/window_tree_client_delegate.h" |
| 22 | 23 |
| 23 namespace base { | 24 namespace base { |
| 24 class SequencedWorkerPool; | 25 class SequencedWorkerPool; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 class WindowManager : public aura::WindowManagerDelegate, | 68 class WindowManager : public aura::WindowManagerDelegate, |
| 68 public aura::WindowTreeClientDelegate { | 69 public aura::WindowTreeClientDelegate { |
| 69 public: | 70 public: |
| 70 WindowManager(service_manager::Connector* connector, Config config); | 71 WindowManager(service_manager::Connector* connector, Config config); |
| 71 ~WindowManager() override; | 72 ~WindowManager() override; |
| 72 | 73 |
| 73 void Init(std::unique_ptr<aura::WindowTreeClient> window_tree_client, | 74 void Init(std::unique_ptr<aura::WindowTreeClient> window_tree_client, |
| 74 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool, | 75 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool, |
| 75 std::unique_ptr<ash::ShellDelegate> shell_delegate = nullptr); | 76 std::unique_ptr<ash::ShellDelegate> shell_delegate = nullptr); |
| 76 | 77 |
| 78 // Sets the callback that is run once the connection to mus is lost. If not |
| 79 // set shutdown occurs when the connection is lost (the Shell is deleted). |
| 80 void SetLostConnectionCallback(base::OnceClosure closure); |
| 81 |
| 77 // Blocks waiting for the initial set of displays. | 82 // Blocks waiting for the initial set of displays. |
| 78 bool WaitForInitialDisplays(); | 83 bool WaitForInitialDisplays(); |
| 79 | 84 |
| 80 // Called during shutdown to delete all the RootWindowControllers. | 85 // Called during shutdown to delete all the RootWindowControllers. |
| 81 void DeleteAllRootWindowControllers(); | 86 void DeleteAllRootWindowControllers(); |
| 82 | 87 |
| 83 Config config() const { return config_; } | 88 Config config() const { return config_; } |
| 84 | 89 |
| 85 ScreenMus* screen() { return screen_.get(); } | 90 ScreenMus* screen() { return screen_.get(); } |
| 86 | 91 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 const gfx::Insets& insets, | 195 const gfx::Insets& insets, |
| 191 const std::vector<gfx::Rect>& additional_client_areas) override; | 196 const std::vector<gfx::Rect>& additional_client_areas) override; |
| 192 bool IsWindowActive(aura::Window* window) override; | 197 bool IsWindowActive(aura::Window* window) override; |
| 193 void OnWmDeactivateWindow(aura::Window* window) override; | 198 void OnWmDeactivateWindow(aura::Window* window) override; |
| 194 | 199 |
| 195 service_manager::Connector* connector_; | 200 service_manager::Connector* connector_; |
| 196 display::mojom::DisplayControllerPtr display_controller_; | 201 display::mojom::DisplayControllerPtr display_controller_; |
| 197 | 202 |
| 198 const Config config_; | 203 const Config config_; |
| 199 | 204 |
| 205 base::OnceClosure lost_connection_callback_; |
| 206 |
| 200 std::unique_ptr<::wm::WMState> wm_state_; | 207 std::unique_ptr<::wm::WMState> wm_state_; |
| 201 std::unique_ptr<aura::PropertyConverter> property_converter_; | 208 std::unique_ptr<aura::PropertyConverter> property_converter_; |
| 202 | 209 |
| 203 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; | 210 std::unique_ptr<aura::WindowTreeClient> window_tree_client_; |
| 204 | 211 |
| 205 aura::WindowManagerClient* window_manager_client_ = nullptr; | 212 aura::WindowManagerClient* window_manager_client_ = nullptr; |
| 206 | 213 |
| 207 std::unique_ptr<views::PointerWatcherEventRouter> | 214 std::unique_ptr<views::PointerWatcherEventRouter> |
| 208 pointer_watcher_event_router_; | 215 pointer_watcher_event_router_; |
| 209 | 216 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 231 | 238 |
| 232 std::unique_ptr<ui::InputDeviceClient> input_device_client_; | 239 std::unique_ptr<ui::InputDeviceClient> input_device_client_; |
| 233 | 240 |
| 234 DISALLOW_COPY_AND_ASSIGN(WindowManager); | 241 DISALLOW_COPY_AND_ASSIGN(WindowManager); |
| 235 }; | 242 }; |
| 236 | 243 |
| 237 } // namespace mus | 244 } // namespace mus |
| 238 } // namespace ash | 245 } // namespace ash |
| 239 | 246 |
| 240 #endif // ASH_MUS_WINDOW_MANAGER_H_ | 247 #endif // ASH_MUS_WINDOW_MANAGER_H_ |
| OLD | NEW |