| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void AddAcceleratorHandler(uint16_t id_namespace, | 87 void AddAcceleratorHandler(uint16_t id_namespace, |
| 88 AcceleratorHandler* handler); | 88 AcceleratorHandler* handler); |
| 89 void RemoveAcceleratorHandler(uint16_t id_namespace); | 89 void RemoveAcceleratorHandler(uint16_t id_namespace); |
| 90 | 90 |
| 91 void AddObserver(WindowManagerObserver* observer); | 91 void AddObserver(WindowManagerObserver* observer); |
| 92 void RemoveObserver(WindowManagerObserver* observer); | 92 void RemoveObserver(WindowManagerObserver* observer); |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 friend class WmTestHelper; | 95 friend class WmTestHelper; |
| 96 | 96 |
| 97 using RootWindowControllers = std::set<std::unique_ptr<RootWindowController>>; |
| 98 |
| 97 RootWindowController* CreateRootWindowController( | 99 RootWindowController* CreateRootWindowController( |
| 98 ui::Window* window, | 100 ui::Window* window, |
| 99 const display::Display& display); | 101 const display::Display& display); |
| 100 | 102 |
| 103 // Deletes the specified RootWindowController. Called when a display is |
| 104 // removed. |
| 105 void DestroyRootWindowController( |
| 106 RootWindowController* root_window_controller); |
| 107 |
| 101 void Shutdown(); | 108 void Shutdown(); |
| 102 | 109 |
| 110 // Returns an iterator into |root_window_controllers_|. Returns |
| 111 // root_window_controllers_.end() if |window| is not the root of a |
| 112 // RootWindowController. |
| 113 RootWindowControllers::iterator FindRootWindowControllerByWindow( |
| 114 ui::Window* window); |
| 115 |
| 103 // ui::WindowObserver: | 116 // ui::WindowObserver: |
| 104 void OnWindowDestroying(ui::Window* window) override; | 117 void OnWindowDestroying(ui::Window* window) override; |
| 105 void OnWindowDestroyed(ui::Window* window) override; | 118 void OnWindowDestroyed(ui::Window* window) override; |
| 106 | 119 |
| 107 // WindowTreeClientDelegate: | 120 // WindowTreeClientDelegate: |
| 108 void OnEmbed(ui::Window* root) override; | 121 void OnEmbed(ui::Window* root) override; |
| 109 void OnEmbedRootDestroyed(ui::Window* root) override; | 122 void OnEmbedRootDestroyed(ui::Window* root) override; |
| 110 void OnLostConnection(ui::WindowTreeClient* client) override; | 123 void OnLostConnection(ui::WindowTreeClient* client) override; |
| 111 void OnPointerEventObserved(const ui::PointerEvent& event, | 124 void OnPointerEventObserved(const ui::PointerEvent& event, |
| 112 ui::Window* target) override; | 125 ui::Window* target) override; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 136 | 149 |
| 137 std::unique_ptr<ui::WindowTreeClient> window_tree_client_; | 150 std::unique_ptr<ui::WindowTreeClient> window_tree_client_; |
| 138 | 151 |
| 139 ui::WindowManagerClient* window_manager_client_ = nullptr; | 152 ui::WindowManagerClient* window_manager_client_ = nullptr; |
| 140 | 153 |
| 141 std::unique_ptr<views::PointerWatcherEventRouter> | 154 std::unique_ptr<views::PointerWatcherEventRouter> |
| 142 pointer_watcher_event_router_; | 155 pointer_watcher_event_router_; |
| 143 | 156 |
| 144 std::unique_ptr<ShadowController> shadow_controller_; | 157 std::unique_ptr<ShadowController> shadow_controller_; |
| 145 | 158 |
| 146 std::set<std::unique_ptr<RootWindowController>> root_window_controllers_; | 159 RootWindowControllers root_window_controllers_; |
| 147 | 160 |
| 148 base::ObserverList<WindowManagerObserver> observers_; | 161 base::ObserverList<WindowManagerObserver> observers_; |
| 149 | 162 |
| 150 std::unique_ptr<display::ScreenBase> screen_; | 163 std::unique_ptr<display::ScreenBase> screen_; |
| 151 | 164 |
| 152 std::unique_ptr<WmShellMus> shell_; | 165 std::unique_ptr<WmShellMus> shell_; |
| 153 | 166 |
| 154 std::unique_ptr<WmLookupMus> lookup_; | 167 std::unique_ptr<WmLookupMus> lookup_; |
| 155 | 168 |
| 156 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_; | 169 std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_; |
| 157 uint16_t next_accelerator_namespace_id_ = 0u; | 170 uint16_t next_accelerator_namespace_id_ = 0u; |
| 158 | 171 |
| 159 DISALLOW_COPY_AND_ASSIGN(WindowManager); | 172 DISALLOW_COPY_AND_ASSIGN(WindowManager); |
| 160 }; | 173 }; |
| 161 | 174 |
| 162 } // namespace mus | 175 } // namespace mus |
| 163 } // namespace ash | 176 } // namespace ash |
| 164 | 177 |
| 165 #endif // ASH_MUS_WINDOW_MANAGER_H_ | 178 #endif // ASH_MUS_WINDOW_MANAGER_H_ |
| OLD | NEW |