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 <memory> | 8 #include <memory> |
9 | 9 |
| 10 #include "ash/public/interfaces/container.mojom.h" |
10 #include "components/mus/public/cpp/window_observer.h" | 11 #include "components/mus/public/cpp/window_observer.h" |
11 #include "components/mus/public/cpp/window_tree_client.h" | 12 #include "components/mus/public/cpp/window_tree_client.h" |
12 #include "components/mus/public/cpp/window_tree_client_delegate.h" | 13 #include "components/mus/public/cpp/window_tree_client_delegate.h" |
13 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" | 14 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" |
14 #include "components/mus/public/interfaces/window_tree_host.mojom.h" | 15 #include "components/mus/public/interfaces/window_tree_host.mojom.h" |
15 #include "mash/wm/public/interfaces/container.mojom.h" | |
16 #include "mash/wm/shelf_layout_manager_delegate.h" | 16 #include "mash/wm/shelf_layout_manager_delegate.h" |
17 #include "mojo/public/cpp/bindings/binding.h" | 17 #include "mojo/public/cpp/bindings/binding.h" |
18 #include "ui/display/display.h" | 18 #include "ui/display/display.h" |
19 | 19 |
20 namespace ash { | 20 namespace ash { |
21 class AlwaysOnTopController; | 21 class AlwaysOnTopController; |
22 } | 22 } |
23 | 23 |
24 namespace mus { | 24 namespace mus { |
25 class WindowManagerClient; | 25 class WindowManagerClient; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // Deletes this. | 63 // Deletes this. |
64 void Destroy(); | 64 void Destroy(); |
65 | 65 |
66 shell::Connector* GetConnector(); | 66 shell::Connector* GetConnector(); |
67 | 67 |
68 mus::Window* root() { return root_; } | 68 mus::Window* root() { return root_; } |
69 | 69 |
70 int window_count() { return window_count_; } | 70 int window_count() { return window_count_; } |
71 void IncrementWindowCount() { ++window_count_; } | 71 void IncrementWindowCount() { ++window_count_; } |
72 | 72 |
73 mus::Window* GetWindowForContainer(mojom::Container container); | 73 mus::Window* GetWindowForContainer(ash::mojom::Container container); |
74 bool WindowIsContainer(const mus::Window* window) const; | 74 bool WindowIsContainer(const mus::Window* window) const; |
75 | 75 |
76 WindowManager* window_manager() { return window_manager_.get(); } | 76 WindowManager* window_manager() { return window_manager_.get(); } |
77 | 77 |
78 mus::WindowManagerClient* window_manager_client(); | 78 mus::WindowManagerClient* window_manager_client(); |
79 | 79 |
80 void OnAccelerator(uint32_t id, const ui::Event& event); | 80 void OnAccelerator(uint32_t id, const ui::Event& event); |
81 | 81 |
82 const display::Display& display() const { return display_; } | 82 const display::Display& display() const { return display_; } |
83 | 83 |
(...skipping 20 matching lines...) Expand all Loading... |
104 void OnWindowTreeClientDestroyed(mus::WindowTreeClient* client) override; | 104 void OnWindowTreeClientDestroyed(mus::WindowTreeClient* client) override; |
105 void OnEventObserved(const ui::Event& event, mus::Window* target) override; | 105 void OnEventObserved(const ui::Event& event, mus::Window* target) override; |
106 | 106 |
107 // mus::WindowObserver: | 107 // mus::WindowObserver: |
108 void OnWindowDestroyed(mus::Window* window) override; | 108 void OnWindowDestroyed(mus::Window* window) override; |
109 | 109 |
110 // ShelfLayoutManagerDelegate: | 110 // ShelfLayoutManagerDelegate: |
111 void OnShelfWindowAvailable() override; | 111 void OnShelfWindowAvailable() override; |
112 | 112 |
113 // Sets up the window containers used for z-space management. | 113 // Sets up the window containers used for z-space management. |
114 void CreateContainer(mash::wm::mojom::Container container, | 114 void CreateContainer(ash::mojom::Container container, |
115 mash::wm::mojom::Container parent_container); | 115 ash::mojom::Container parent_container); |
116 void CreateContainers(); | 116 void CreateContainers(); |
117 | 117 |
118 WindowManagerApplication* app_; | 118 WindowManagerApplication* app_; |
119 mus::Window* root_; | 119 mus::Window* root_; |
120 int window_count_; | 120 int window_count_; |
121 | 121 |
122 std::unique_ptr<WmRootWindowControllerMus> wm_root_window_controller_; | 122 std::unique_ptr<WmRootWindowControllerMus> wm_root_window_controller_; |
123 std::unique_ptr<WmShelfMus> wm_shelf_; | 123 std::unique_ptr<WmShelfMus> wm_shelf_; |
124 | 124 |
125 std::unique_ptr<WindowManager> window_manager_; | 125 std::unique_ptr<WindowManager> window_manager_; |
126 | 126 |
127 std::map<mus::Window*, std::unique_ptr<LayoutManager>> layout_managers_; | 127 std::map<mus::Window*, std::unique_ptr<LayoutManager>> layout_managers_; |
128 | 128 |
129 std::unique_ptr<ShadowController> shadow_controller_; | 129 std::unique_ptr<ShadowController> shadow_controller_; |
130 | 130 |
131 display::Display display_; | 131 display::Display display_; |
132 | 132 |
133 std::unique_ptr<ash::AlwaysOnTopController> always_on_top_controller_; | 133 std::unique_ptr<ash::AlwaysOnTopController> always_on_top_controller_; |
134 | 134 |
135 DISALLOW_COPY_AND_ASSIGN(RootWindowController); | 135 DISALLOW_COPY_AND_ASSIGN(RootWindowController); |
136 }; | 136 }; |
137 | 137 |
138 } // namespace wm | 138 } // namespace wm |
139 } // namespace mash | 139 } // namespace mash |
140 | 140 |
141 #endif // MASH_WM_ROOT_WINDOW_CONTROLLER_H_ | 141 #endif // MASH_WM_ROOT_WINDOW_CONTROLLER_H_ |
OLD | NEW |