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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 : public shell::Service, | 44 : public shell::Service, |
45 public shell::InterfaceFactory<mojom::ShelfLayout>, | 45 public shell::InterfaceFactory<mojom::ShelfLayout>, |
46 public shell::InterfaceFactory<mojom::UserWindowController>, | 46 public shell::InterfaceFactory<mojom::UserWindowController>, |
47 public shell::InterfaceFactory<::ui::mojom::AcceleratorRegistrar>, | 47 public shell::InterfaceFactory<::ui::mojom::AcceleratorRegistrar>, |
48 public mash::session::mojom::ScreenlockStateListener, | 48 public mash::session::mojom::ScreenlockStateListener, |
49 public WindowManagerObserver { | 49 public WindowManagerObserver { |
50 public: | 50 public: |
51 WindowManagerApplication(); | 51 WindowManagerApplication(); |
52 ~WindowManagerApplication() override; | 52 ~WindowManagerApplication() override; |
53 | 53 |
54 shell::Connector* connector() { return connector_; } | |
55 | |
56 WindowManager* window_manager() { return window_manager_.get(); } | 54 WindowManager* window_manager() { return window_manager_.get(); } |
57 | 55 |
58 mash::session::mojom::Session* session() { return session_.get(); } | 56 mash::session::mojom::Session* session() { return session_.get(); } |
59 | 57 |
60 private: | 58 private: |
61 friend class WmTestBase; | 59 friend class WmTestBase; |
62 friend class WmTestHelper; | 60 friend class WmTestHelper; |
63 | 61 |
64 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar); | 62 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar); |
65 | 63 |
66 void InitWindowManager(::ui::WindowTreeClient* window_tree_client); | 64 void InitWindowManager(::ui::WindowTreeClient* window_tree_client); |
67 | 65 |
68 // shell::Service: | 66 // shell::Service: |
69 void OnStart(shell::Connector* connector, | 67 void OnStart(const shell::Identity& identity) override; |
70 const shell::Identity& identity, | |
71 uint32_t id) override; | |
72 bool OnConnect(shell::Connection* connection) override; | 68 bool OnConnect(shell::Connection* connection) override; |
73 | 69 |
74 // shell::InterfaceFactory<mojom::ShelfLayout>: | 70 // shell::InterfaceFactory<mojom::ShelfLayout>: |
75 void Create(const shell::Identity& remote_identity, | 71 void Create(const shell::Identity& remote_identity, |
76 mojo::InterfaceRequest<mojom::ShelfLayout> request) override; | 72 mojo::InterfaceRequest<mojom::ShelfLayout> request) override; |
77 | 73 |
78 // shell::InterfaceFactory<mojom::UserWindowController>: | 74 // shell::InterfaceFactory<mojom::UserWindowController>: |
79 void Create( | 75 void Create( |
80 const shell::Identity& remote_identity, | 76 const shell::Identity& remote_identity, |
81 mojo::InterfaceRequest<mojom::UserWindowController> request) override; | 77 mojo::InterfaceRequest<mojom::UserWindowController> request) override; |
82 | 78 |
83 // shell::InterfaceFactory<ui::mojom::AcceleratorRegistrar>: | 79 // shell::InterfaceFactory<ui::mojom::AcceleratorRegistrar>: |
84 void Create(const shell::Identity& remote_identity, | 80 void Create(const shell::Identity& remote_identity, |
85 mojo::InterfaceRequest<::ui::mojom::AcceleratorRegistrar> request) | 81 mojo::InterfaceRequest<::ui::mojom::AcceleratorRegistrar> request) |
86 override; | 82 override; |
87 | 83 |
88 // session::mojom::ScreenlockStateListener: | 84 // session::mojom::ScreenlockStateListener: |
89 void ScreenlockStateChanged(bool locked) override; | 85 void ScreenlockStateChanged(bool locked) override; |
90 | 86 |
91 // WindowManagerObserver: | 87 // WindowManagerObserver: |
92 void OnRootWindowControllerAdded(RootWindowController* controller) override; | 88 void OnRootWindowControllerAdded(RootWindowController* controller) override; |
93 void OnWillDestroyRootWindowController( | 89 void OnWillDestroyRootWindowController( |
94 RootWindowController* controller) override; | 90 RootWindowController* controller) override; |
95 | 91 |
96 shell::Connector* connector_; | |
97 | |
98 mojo::TracingImpl tracing_; | 92 mojo::TracingImpl tracing_; |
99 | 93 |
100 std::unique_ptr<views::AuraInit> aura_init_; | 94 std::unique_ptr<views::AuraInit> aura_init_; |
101 | 95 |
102 // The |shelf_layout_| object is created once OnEmbed() is called. Until that | 96 // The |shelf_layout_| object is created once OnEmbed() is called. Until that |
103 // time |shelf_layout_requests_| stores pending interface requests. | 97 // time |shelf_layout_requests_| stores pending interface requests. |
104 std::unique_ptr<ShelfLayoutImpl> shelf_layout_; | 98 std::unique_ptr<ShelfLayoutImpl> shelf_layout_; |
105 mojo::BindingSet<mojom::ShelfLayout> shelf_layout_bindings_; | 99 mojo::BindingSet<mojom::ShelfLayout> shelf_layout_bindings_; |
106 std::vector<mojo::InterfaceRequest<mojom::ShelfLayout>> | 100 std::vector<mojo::InterfaceRequest<mojom::ShelfLayout>> |
107 shelf_layout_requests_; | 101 shelf_layout_requests_; |
(...skipping 15 matching lines...) Expand all Loading... |
123 mojo::Binding<mash::session::mojom::ScreenlockStateListener> | 117 mojo::Binding<mash::session::mojom::ScreenlockStateListener> |
124 screenlock_state_listener_binding_; | 118 screenlock_state_listener_binding_; |
125 | 119 |
126 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); | 120 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); |
127 }; | 121 }; |
128 | 122 |
129 } // namespace mus | 123 } // namespace mus |
130 } // namespace ash | 124 } // namespace ash |
131 | 125 |
132 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ | 126 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ |
OLD | NEW |