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_APPLICATION_H_ | 5 #ifndef ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ |
6 #define ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ | 6 #define ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 namespace ash { | 40 namespace ash { |
41 namespace mus { | 41 namespace mus { |
42 | 42 |
43 class AcceleratorRegistrarImpl; | 43 class AcceleratorRegistrarImpl; |
44 class RootWindowController; | 44 class RootWindowController; |
45 class RootWindowsObserver; | 45 class RootWindowsObserver; |
46 class ShelfLayoutImpl; | 46 class ShelfLayoutImpl; |
47 class UserWindowControllerImpl; | 47 class UserWindowControllerImpl; |
48 class WmGlobalsMus; | 48 class WmShellMus; |
49 class WmLookupMus; | 49 class WmLookupMus; |
50 class WmScreen; | 50 class WmScreen; |
51 | 51 |
52 class WindowManagerApplication | 52 class WindowManagerApplication |
53 : public shell::ShellClient, | 53 : public shell::ShellClient, |
54 public ::mus::mojom::WindowManagerFactory, | 54 public ::mus::mojom::WindowManagerFactory, |
55 public shell::InterfaceFactory<mojom::ShelfLayout>, | 55 public shell::InterfaceFactory<mojom::ShelfLayout>, |
56 public shell::InterfaceFactory<mojom::UserWindowController>, | 56 public shell::InterfaceFactory<mojom::UserWindowController>, |
57 public shell::InterfaceFactory<::mus::mojom::AcceleratorRegistrar> { | 57 public shell::InterfaceFactory<::mus::mojom::AcceleratorRegistrar> { |
58 public: | 58 public: |
59 WindowManagerApplication(); | 59 WindowManagerApplication(); |
60 ~WindowManagerApplication() override; | 60 ~WindowManagerApplication() override; |
61 | 61 |
62 shell::Connector* connector() { return connector_; } | 62 shell::Connector* connector() { return connector_; } |
63 | 63 |
64 // Returns the RootWindowControllers that have valid roots. | 64 // Returns the RootWindowControllers that have valid roots. |
65 // | 65 // |
66 // NOTE: this does not return |controllers_| as most clients want a | 66 // NOTE: this does not return |controllers_| as most clients want a |
67 // RootWindowController that has a valid root window. | 67 // RootWindowController that has a valid root window. |
68 std::set<RootWindowController*> GetRootControllers(); | 68 std::set<RootWindowController*> GetRootControllers(); |
69 | 69 |
70 WmGlobalsMus* globals() { return globals_.get(); } | 70 WmShellMus* shell() { return shell_.get(); } |
71 | 71 |
72 // Called when the root window of |root_controller| is obtained. | 72 // Called when the root window of |root_controller| is obtained. |
73 void OnRootWindowControllerGotRoot(RootWindowController* root_controller); | 73 void OnRootWindowControllerGotRoot(RootWindowController* root_controller); |
74 | 74 |
75 // Called after RootWindowController creates the necessary resources. | 75 // Called after RootWindowController creates the necessary resources. |
76 void OnRootWindowControllerDoneInit(RootWindowController* root_controller); | 76 void OnRootWindowControllerDoneInit(RootWindowController* root_controller); |
77 | 77 |
78 // Called when the root mus::Window of RootWindowController is destroyed. | 78 // Called when the root mus::Window of RootWindowController is destroyed. |
79 // |root_controller| is destroyed after this call. | 79 // |root_controller| is destroyed after this call. |
80 void OnRootWindowDestroyed(RootWindowController* root_controller); | 80 void OnRootWindowDestroyed(RootWindowController* root_controller); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 mojo::InterfaceRequest<::mus::mojom::WindowTreeClient> client_request) | 122 mojo::InterfaceRequest<::mus::mojom::WindowTreeClient> client_request) |
123 override; | 123 override; |
124 | 124 |
125 shell::Connector* connector_; | 125 shell::Connector* connector_; |
126 | 126 |
127 mojo::TracingImpl tracing_; | 127 mojo::TracingImpl tracing_; |
128 | 128 |
129 std::unique_ptr<display::Screen> screen_; | 129 std::unique_ptr<display::Screen> screen_; |
130 std::unique_ptr<views::AuraInit> aura_init_; | 130 std::unique_ptr<views::AuraInit> aura_init_; |
131 | 131 |
132 std::unique_ptr<WmGlobalsMus> globals_; | 132 std::unique_ptr<WmShellMus> shell_; |
133 std::unique_ptr<WmLookupMus> lookup_; | 133 std::unique_ptr<WmLookupMus> lookup_; |
134 | 134 |
135 // The |shelf_layout_| object is created once OnEmbed() is called. Until that | 135 // The |shelf_layout_| object is created once OnEmbed() is called. Until that |
136 // time |shelf_layout_requests_| stores pending interface requests. | 136 // time |shelf_layout_requests_| stores pending interface requests. |
137 std::unique_ptr<ShelfLayoutImpl> shelf_layout_; | 137 std::unique_ptr<ShelfLayoutImpl> shelf_layout_; |
138 mojo::BindingSet<mojom::ShelfLayout> shelf_layout_bindings_; | 138 mojo::BindingSet<mojom::ShelfLayout> shelf_layout_bindings_; |
139 std::vector<std::unique_ptr<mojo::InterfaceRequest<mojom::ShelfLayout>>> | 139 std::vector<std::unique_ptr<mojo::InterfaceRequest<mojom::ShelfLayout>>> |
140 shelf_layout_requests_; | 140 shelf_layout_requests_; |
141 | 141 |
142 // |user_window_controller_| is created once OnEmbed() is called. Until that | 142 // |user_window_controller_| is created once OnEmbed() is called. Until that |
(...skipping 15 matching lines...) Expand all Loading... |
158 | 158 |
159 base::ObserverList<RootWindowsObserver> root_windows_observers_; | 159 base::ObserverList<RootWindowsObserver> root_windows_observers_; |
160 | 160 |
161 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); | 161 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); |
162 }; | 162 }; |
163 | 163 |
164 } // namespace mus | 164 } // namespace mus |
165 } // namespace ash | 165 } // namespace ash |
166 | 166 |
167 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ | 167 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ |
OLD | NEW |