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> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "components/mus/common/types.h" | 15 #include "components/mus/common/types.h" |
16 #include "components/mus/public/interfaces/accelerator_registrar.mojom.h" | 16 #include "components/mus/public/interfaces/accelerator_registrar.mojom.h" |
17 #include "components/mus/public/interfaces/window_manager.mojom.h" | 17 #include "components/mus/public/interfaces/window_manager.mojom.h" |
18 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" | 18 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" |
19 #include "components/mus/public/interfaces/window_tree_host.mojom.h" | 19 #include "components/mus/public/interfaces/window_tree_host.mojom.h" |
20 #include "mash/shell/public/interfaces/shell.mojom.h" | 20 #include "mash/session/public/interfaces/session.mojom.h" |
21 #include "mash/wm/public/interfaces/user_window_controller.mojom.h" | 21 #include "mash/wm/public/interfaces/user_window_controller.mojom.h" |
22 #include "mojo/public/cpp/bindings/binding.h" | 22 #include "mojo/public/cpp/bindings/binding.h" |
23 #include "mojo/public/cpp/bindings/binding_set.h" | 23 #include "mojo/public/cpp/bindings/binding_set.h" |
24 #include "mojo/services/tracing/public/cpp/tracing_impl.h" | 24 #include "mojo/services/tracing/public/cpp/tracing_impl.h" |
25 #include "mojo/shell/public/cpp/shell_client.h" | 25 #include "mojo/shell/public/cpp/shell_client.h" |
26 | 26 |
27 namespace ui { | 27 namespace ui { |
28 namespace mojo { | 28 namespace mojo { |
29 class UIInit; | 29 class UIInit; |
30 } | 30 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // Called when the root mus::Window of RootWindowController is destroyed. | 72 // Called when the root mus::Window of RootWindowController is destroyed. |
73 // |root_controller| is destroyed after this call. | 73 // |root_controller| is destroyed after this call. |
74 void OnRootWindowDestroyed(RootWindowController* root_controller); | 74 void OnRootWindowDestroyed(RootWindowController* root_controller); |
75 | 75 |
76 // TODO(sky): figure out right place for this code. | 76 // TODO(sky): figure out right place for this code. |
77 void OnAccelerator(uint32_t id, const ui::Event& event); | 77 void OnAccelerator(uint32_t id, const ui::Event& event); |
78 | 78 |
79 void AddRootWindowsObserver(RootWindowsObserver* observer); | 79 void AddRootWindowsObserver(RootWindowsObserver* observer); |
80 void RemoveRootWindowsObserver(RootWindowsObserver* observer); | 80 void RemoveRootWindowsObserver(RootWindowsObserver* observer); |
81 | 81 |
82 mash::shell::mojom::Shell* mash_shell() { | 82 session::mojom::Session* session() { |
83 return mash_shell_.get(); | 83 return session_.get(); |
84 } | 84 } |
85 | 85 |
86 private: | 86 private: |
87 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar); | 87 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar); |
88 | 88 |
89 // mojo::ShellClient: | 89 // mojo::ShellClient: |
90 void Initialize(mojo::Connector* connector, const mojo::Identity& identity, | 90 void Initialize(mojo::Connector* connector, const mojo::Identity& identity, |
91 uint32_t id) override; | 91 uint32_t id) override; |
92 bool AcceptConnection(mojo::Connection* connection) override; | 92 bool AcceptConnection(mojo::Connection* connection) override; |
93 void ShellConnectionLost() override; | 93 void ShellConnectionLost() override; |
(...skipping 28 matching lines...) Expand all Loading... |
122 std::vector< | 122 std::vector< |
123 scoped_ptr<mojo::InterfaceRequest<mash::wm::mojom::UserWindowController>>> | 123 scoped_ptr<mojo::InterfaceRequest<mash::wm::mojom::UserWindowController>>> |
124 user_window_controller_requests_; | 124 user_window_controller_requests_; |
125 | 125 |
126 std::set<AcceleratorRegistrarImpl*> accelerator_registrars_; | 126 std::set<AcceleratorRegistrarImpl*> accelerator_registrars_; |
127 std::set<RootWindowController*> root_controllers_; | 127 std::set<RootWindowController*> root_controllers_; |
128 | 128 |
129 mojo::Binding<mus::mojom::WindowManagerFactory> | 129 mojo::Binding<mus::mojom::WindowManagerFactory> |
130 window_manager_factory_binding_; | 130 window_manager_factory_binding_; |
131 | 131 |
132 mash::shell::mojom::ShellPtr mash_shell_; | 132 mash::session::mojom::SessionPtr session_; |
133 | 133 |
134 base::ObserverList<RootWindowsObserver> root_windows_observers_; | 134 base::ObserverList<RootWindowsObserver> root_windows_observers_; |
135 | 135 |
136 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); | 136 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); |
137 }; | 137 }; |
138 | 138 |
139 } // namespace wm | 139 } // namespace wm |
140 } // namespace mash | 140 } // namespace mash |
141 | 141 |
142 #endif // MASH_WM_WINDOW_MANAGER_APPLICATION_H_ | 142 #endif // MASH_WM_WINDOW_MANAGER_APPLICATION_H_ |
OLD | NEW |