| 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 MASH_WM_ROOT_WINDOW_CONTROLLER_H_ | 5 #ifndef MASH_WM_ROOT_WINDOW_CONTROLLER_H_ |
| 6 #define MASH_WM_ROOT_WINDOW_CONTROLLER_H_ | 6 #define MASH_WM_ROOT_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "components/mus/public/cpp/window_observer.h" | 8 #include "components/mus/public/cpp/window_observer.h" |
| 9 #include "components/mus/public/cpp/window_tree_delegate.h" | 9 #include "components/mus/public/cpp/window_tree_delegate.h" |
| 10 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" | 10 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" |
| 11 #include "components/mus/public/interfaces/window_tree_host.mojom.h" | 11 #include "components/mus/public/interfaces/window_tree_host.mojom.h" |
| 12 #include "mash/wm/public/interfaces/container.mojom.h" | 12 #include "mash/wm/public/interfaces/container.mojom.h" |
| 13 #include "mojo/public/cpp/bindings/binding.h" | 13 #include "mojo/public/cpp/bindings/binding.h" |
| 14 | 14 |
| 15 namespace mojo { | 15 namespace mojo { |
| 16 class Connector; | 16 class Connector; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace mus { | 19 namespace mus { |
| 20 class WindowManagerClient; | 20 class WindowManagerClient; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace ui { |
| 24 class Event; |
| 25 } |
| 26 |
| 23 namespace mash { | 27 namespace mash { |
| 24 namespace wm { | 28 namespace wm { |
| 25 | 29 |
| 26 class LayoutManager; | 30 class LayoutManager; |
| 27 class ShadowController; | 31 class ShadowController; |
| 28 class WindowManager; | 32 class WindowManager; |
| 29 class WindowManagerApplication; | 33 class WindowManagerApplication; |
| 30 | 34 |
| 31 // RootWindowController manages the windows and state for a single display. | 35 // RootWindowController manages the windows and state for a single display. |
| 32 // | 36 // |
| (...skipping 18 matching lines...) Expand all Loading... |
| 51 void IncrementWindowCount() { ++window_count_; } | 55 void IncrementWindowCount() { ++window_count_; } |
| 52 | 56 |
| 53 mus::Window* GetWindowForContainer(mojom::Container container); | 57 mus::Window* GetWindowForContainer(mojom::Container container); |
| 54 mus::Window* GetWindowById(mus::Id id); | 58 mus::Window* GetWindowById(mus::Id id); |
| 55 bool WindowIsContainer(const mus::Window* window) const; | 59 bool WindowIsContainer(const mus::Window* window) const; |
| 56 | 60 |
| 57 WindowManager* window_manager() { return window_manager_.get(); } | 61 WindowManager* window_manager() { return window_manager_.get(); } |
| 58 | 62 |
| 59 mus::WindowManagerClient* window_manager_client(); | 63 mus::WindowManagerClient* window_manager_client(); |
| 60 | 64 |
| 61 void OnAccelerator(uint32_t id, mus::mojom::EventPtr event); | 65 void OnAccelerator(uint32_t id, const ui::Event& event); |
| 62 | 66 |
| 63 private: | 67 private: |
| 64 explicit RootWindowController(WindowManagerApplication* app); | 68 explicit RootWindowController(WindowManagerApplication* app); |
| 65 ~RootWindowController() override; | 69 ~RootWindowController() override; |
| 66 | 70 |
| 67 void AddAccelerators(); | 71 void AddAccelerators(); |
| 68 | 72 |
| 69 // WindowTreeDelegate: | 73 // WindowTreeDelegate: |
| 70 void OnEmbed(mus::Window* root) override; | 74 void OnEmbed(mus::Window* root) override; |
| 71 void OnConnectionLost(mus::WindowTreeConnection* connection) override; | 75 void OnConnectionLost(mus::WindowTreeConnection* connection) override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 90 | 94 |
| 91 mus::mojom::DisplayPtr display_; | 95 mus::mojom::DisplayPtr display_; |
| 92 | 96 |
| 93 DISALLOW_COPY_AND_ASSIGN(RootWindowController); | 97 DISALLOW_COPY_AND_ASSIGN(RootWindowController); |
| 94 }; | 98 }; |
| 95 | 99 |
| 96 } // namespace wm | 100 } // namespace wm |
| 97 } // namespace mash | 101 } // namespace mash |
| 98 | 102 |
| 99 #endif // MASH_WM_ROOT_WINDOW_CONTROLLER_H_ | 103 #endif // MASH_WM_ROOT_WINDOW_CONTROLLER_H_ |
| OLD | NEW |