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 MASH_WM_WINDOW_MANAGER_APPLICATION_H_ | 5 #ifndef MASH_WM_WINDOW_MANAGER_APPLICATION_H_ |
6 #define MASH_WM_WINDOW_MANAGER_APPLICATION_H_ | 6 #define MASH_WM_WINDOW_MANAGER_APPLICATION_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 class UserWindowControllerImpl; | 45 class UserWindowControllerImpl; |
46 class WindowLayout; | 46 class WindowLayout; |
47 class WindowManagerImpl; | 47 class WindowManagerImpl; |
48 | 48 |
49 class WindowManagerApplication | 49 class WindowManagerApplication |
50 : public mojo::ApplicationDelegate, | 50 : public mojo::ApplicationDelegate, |
51 public mus::WindowObserver, | 51 public mus::WindowObserver, |
52 public mus::mojom::WindowTreeHostClient, | 52 public mus::mojom::WindowTreeHostClient, |
53 public mus::WindowTreeDelegate, | 53 public mus::WindowTreeDelegate, |
54 public mojo::InterfaceFactory<mash::wm::mojom::UserWindowController>, | 54 public mojo::InterfaceFactory<mash::wm::mojom::UserWindowController>, |
55 public mojo::InterfaceFactory<mus::mojom::WindowManager>, | 55 public mojo::InterfaceFactory<mus::mojom::WindowManagerDeprecated>, |
56 public mojo::InterfaceFactory<mus::mojom::AcceleratorRegistrar> { | 56 public mojo::InterfaceFactory<mus::mojom::AcceleratorRegistrar> { |
57 public: | 57 public: |
58 WindowManagerApplication(); | 58 WindowManagerApplication(); |
59 ~WindowManagerApplication() override; | 59 ~WindowManagerApplication() override; |
60 | 60 |
61 mus::Window* root() { return root_; } | 61 mus::Window* root() { return root_; } |
62 | 62 |
63 int window_count() { return window_count_; } | 63 int window_count() { return window_count_; } |
64 void IncrementWindowCount() { ++window_count_; } | 64 void IncrementWindowCount() { ++window_count_; } |
65 | 65 |
(...skipping 26 matching lines...) Expand all Loading... |
92 // InterfaceFactory<mash::wm::mojom::UserWindowController>: | 92 // InterfaceFactory<mash::wm::mojom::UserWindowController>: |
93 void Create(mojo::ApplicationConnection* connection, | 93 void Create(mojo::ApplicationConnection* connection, |
94 mojo::InterfaceRequest<mash::wm::mojom::UserWindowController> | 94 mojo::InterfaceRequest<mash::wm::mojom::UserWindowController> |
95 request) override; | 95 request) override; |
96 | 96 |
97 // InterfaceFactory<mus::mojom::AcceleratorRegistrar>: | 97 // InterfaceFactory<mus::mojom::AcceleratorRegistrar>: |
98 void Create(mojo::ApplicationConnection* connection, | 98 void Create(mojo::ApplicationConnection* connection, |
99 mojo::InterfaceRequest<mus::mojom::AcceleratorRegistrar> request) | 99 mojo::InterfaceRequest<mus::mojom::AcceleratorRegistrar> request) |
100 override; | 100 override; |
101 | 101 |
102 // InterfaceFactory<mus::mojom::WindowManager>: | 102 // InterfaceFactory<mus::mojom::WindowManagerDeprecated>: |
103 void Create( | 103 void Create(mojo::ApplicationConnection* connection, |
104 mojo::ApplicationConnection* connection, | 104 mojo::InterfaceRequest<mus::mojom::WindowManagerDeprecated> |
105 mojo::InterfaceRequest<mus::mojom::WindowManager> request) override; | 105 request) 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 // Sets up the window containers used for z-space management. | 110 // Sets up the window containers used for z-space management. |
111 void CreateContainers(); | 111 void CreateContainers(); |
112 | 112 |
113 // nullptr until the Mus connection is established via OnEmbed(). | 113 // nullptr until the Mus connection is established via OnEmbed(). |
114 mus::Window* root_; | 114 mus::Window* root_; |
115 int window_count_; | 115 int window_count_; |
116 | 116 |
117 mojo::ApplicationImpl* app_; | 117 mojo::ApplicationImpl* app_; |
118 | 118 |
119 mojo::TracingImpl tracing_; | 119 mojo::TracingImpl tracing_; |
120 | 120 |
121 mus::mojom::WindowTreeHostPtr window_tree_host_; | 121 mus::mojom::WindowTreeHostPtr window_tree_host_; |
122 mojo::Binding<mus::mojom::WindowTreeHostClient> host_client_binding_; | 122 mojo::Binding<mus::mojom::WindowTreeHostClient> host_client_binding_; |
123 | 123 |
124 scoped_ptr<ui::mojo::UIInit> ui_init_; | 124 scoped_ptr<ui::mojo::UIInit> ui_init_; |
125 scoped_ptr<views::AuraInit> aura_init_; | 125 scoped_ptr<views::AuraInit> aura_init_; |
126 | 126 |
127 // |window_manager_| is created once OnEmbed() is called. Until that time | 127 // |window_manager_| is created once OnEmbed() is called. Until that time |
128 // |requests_| stores any pending WindowManager interface requests. | 128 // |requests_| stores any pending WindowManager interface requests. |
129 scoped_ptr<WindowManagerImpl> window_manager_; | 129 scoped_ptr<WindowManagerImpl> window_manager_; |
130 mojo::WeakBindingSet<mus::mojom::WindowManager> window_manager_binding_; | 130 mojo::WeakBindingSet<mus::mojom::WindowManagerDeprecated> |
131 std::vector<scoped_ptr<mojo::InterfaceRequest<mus::mojom::WindowManager>>> | 131 window_manager_binding_; |
| 132 std::vector< |
| 133 scoped_ptr<mojo::InterfaceRequest<mus::mojom::WindowManagerDeprecated>>> |
132 requests_; | 134 requests_; |
133 | 135 |
134 // |user_window_controller_| is created once OnEmbed() is called. Until that | 136 // |user_window_controller_| is created once OnEmbed() is called. Until that |
135 // time |user_window_controller_requests_| stores pending interface requests. | 137 // time |user_window_controller_requests_| stores pending interface requests. |
136 scoped_ptr<UserWindowControllerImpl> user_window_controller_; | 138 scoped_ptr<UserWindowControllerImpl> user_window_controller_; |
137 mojo::WeakBindingSet<mash::wm::mojom::UserWindowController> | 139 mojo::WeakBindingSet<mash::wm::mojom::UserWindowController> |
138 user_window_controller_binding_; | 140 user_window_controller_binding_; |
139 std::vector< | 141 std::vector< |
140 scoped_ptr<mojo::InterfaceRequest<mash::wm::mojom::UserWindowController>>> | 142 scoped_ptr<mojo::InterfaceRequest<mash::wm::mojom::UserWindowController>>> |
141 user_window_controller_requests_; | 143 user_window_controller_requests_; |
142 | 144 |
143 scoped_ptr<BackgroundLayout> background_layout_; | 145 scoped_ptr<BackgroundLayout> background_layout_; |
144 scoped_ptr<ScreenlockLayout> screenlock_layout_; | 146 scoped_ptr<ScreenlockLayout> screenlock_layout_; |
145 scoped_ptr<ShelfLayout> shelf_layout_; | 147 scoped_ptr<ShelfLayout> shelf_layout_; |
146 scoped_ptr<WindowLayout> window_layout_; | 148 scoped_ptr<WindowLayout> window_layout_; |
147 | 149 |
148 scoped_ptr<ShadowController> shadow_controller_; | 150 scoped_ptr<ShadowController> shadow_controller_; |
149 | 151 |
150 std::set<AcceleratorRegistrarImpl*> accelerator_registrars_; | 152 std::set<AcceleratorRegistrarImpl*> accelerator_registrars_; |
151 | 153 |
152 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); | 154 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); |
153 }; | 155 }; |
154 | 156 |
155 } // namespace wm | 157 } // namespace wm |
156 } // namespace mash | 158 } // namespace mash |
157 | 159 |
158 #endif // MASH_WM_WINDOW_MANAGER_APPLICATION_H_ | 160 #endif // MASH_WM_WINDOW_MANAGER_APPLICATION_H_ |
OLD | NEW |