| 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> |
| 11 #include <set> | 11 #include <set> |
| 12 | 12 |
| 13 #include "ash/mus/root_windows_observer.h" | 13 #include "ash/mus/window_manager_observer.h" |
| 14 #include "ash/public/interfaces/shelf_layout.mojom.h" | 14 #include "ash/public/interfaces/shelf_layout.mojom.h" |
| 15 #include "ash/public/interfaces/user_window_controller.mojom.h" | 15 #include "ash/public/interfaces/user_window_controller.mojom.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "components/mus/common/types.h" | 17 #include "components/mus/common/types.h" |
| 18 #include "components/mus/public/interfaces/accelerator_registrar.mojom.h" | 18 #include "components/mus/public/interfaces/accelerator_registrar.mojom.h" |
| 19 #include "mash/session/public/interfaces/session.mojom.h" | 19 #include "mash/session/public/interfaces/session.mojom.h" |
| 20 #include "mojo/public/cpp/bindings/binding.h" | 20 #include "mojo/public/cpp/bindings/binding.h" |
| 21 #include "mojo/public/cpp/bindings/binding_set.h" | 21 #include "mojo/public/cpp/bindings/binding_set.h" |
| 22 #include "services/shell/public/cpp/shell_client.h" | 22 #include "services/shell/public/cpp/shell_client.h" |
| 23 #include "services/tracing/public/cpp/tracing_impl.h" | 23 #include "services/tracing/public/cpp/tracing_impl.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 42 class ShelfLayoutImpl; | 42 class ShelfLayoutImpl; |
| 43 class UserWindowControllerImpl; | 43 class UserWindowControllerImpl; |
| 44 class WindowManager; | 44 class WindowManager; |
| 45 | 45 |
| 46 class WindowManagerApplication | 46 class WindowManagerApplication |
| 47 : public shell::ShellClient, | 47 : public shell::ShellClient, |
| 48 public shell::InterfaceFactory<mojom::ShelfLayout>, | 48 public shell::InterfaceFactory<mojom::ShelfLayout>, |
| 49 public shell::InterfaceFactory<mojom::UserWindowController>, | 49 public shell::InterfaceFactory<mojom::UserWindowController>, |
| 50 public shell::InterfaceFactory<::mus::mojom::AcceleratorRegistrar>, | 50 public shell::InterfaceFactory<::mus::mojom::AcceleratorRegistrar>, |
| 51 public mash::session::mojom::ScreenlockStateListener, | 51 public mash::session::mojom::ScreenlockStateListener, |
| 52 public RootWindowsObserver { | 52 public WindowManagerObserver { |
| 53 public: | 53 public: |
| 54 WindowManagerApplication(); | 54 WindowManagerApplication(); |
| 55 ~WindowManagerApplication() override; | 55 ~WindowManagerApplication() override; |
| 56 | 56 |
| 57 shell::Connector* connector() { return connector_; } | 57 shell::Connector* connector() { return connector_; } |
| 58 | 58 |
| 59 WindowManager* window_manager() { return window_manager_.get(); } | 59 WindowManager* window_manager() { return window_manager_.get(); } |
| 60 | 60 |
| 61 // TODO(sky): figure out right place for this code. | |
| 62 void OnAccelerator(uint32_t id, const ui::Event& event); | |
| 63 | |
| 64 mash::session::mojom::Session* session() { return session_.get(); } | 61 mash::session::mojom::Session* session() { return session_.get(); } |
| 65 | 62 |
| 66 private: | 63 private: |
| 67 friend class WmTestBase; | 64 friend class WmTestBase; |
| 68 friend class WmTestHelper; | 65 friend class WmTestHelper; |
| 69 | 66 |
| 70 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar); | 67 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar); |
| 71 | 68 |
| 72 void InitWindowManager(::mus::WindowTreeClient* window_tree_client); | 69 void InitWindowManager(::mus::WindowTreeClient* window_tree_client); |
| 73 | 70 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 87 mojo::InterfaceRequest<mojom::UserWindowController> request) override; | 84 mojo::InterfaceRequest<mojom::UserWindowController> request) override; |
| 88 | 85 |
| 89 // shell::InterfaceFactory<mus::mojom::AcceleratorRegistrar>: | 86 // shell::InterfaceFactory<mus::mojom::AcceleratorRegistrar>: |
| 90 void Create(shell::Connection* connection, | 87 void Create(shell::Connection* connection, |
| 91 mojo::InterfaceRequest<::mus::mojom::AcceleratorRegistrar> | 88 mojo::InterfaceRequest<::mus::mojom::AcceleratorRegistrar> |
| 92 request) override; | 89 request) override; |
| 93 | 90 |
| 94 // session::mojom::ScreenlockStateListener: | 91 // session::mojom::ScreenlockStateListener: |
| 95 void ScreenlockStateChanged(bool locked) override; | 92 void ScreenlockStateChanged(bool locked) override; |
| 96 | 93 |
| 97 // RootWindowsObserver: | 94 // WindowManagerObserver: |
| 98 void OnRootWindowControllerAdded(RootWindowController* controller) override; | 95 void OnRootWindowControllerAdded(RootWindowController* controller) override; |
| 99 void OnWillDestroyRootWindowController( | 96 void OnWillDestroyRootWindowController( |
| 100 RootWindowController* controller) override; | 97 RootWindowController* controller) override; |
| 101 | 98 |
| 102 shell::Connector* connector_; | 99 shell::Connector* connector_; |
| 103 | 100 |
| 104 mojo::TracingImpl tracing_; | 101 mojo::TracingImpl tracing_; |
| 105 | 102 |
| 106 std::unique_ptr<views::AuraInit> aura_init_; | 103 std::unique_ptr<views::AuraInit> aura_init_; |
| 107 | 104 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 130 mojo::Binding<mash::session::mojom::ScreenlockStateListener> | 127 mojo::Binding<mash::session::mojom::ScreenlockStateListener> |
| 131 screenlock_state_listener_binding_; | 128 screenlock_state_listener_binding_; |
| 132 | 129 |
| 133 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); | 130 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); |
| 134 }; | 131 }; |
| 135 | 132 |
| 136 } // namespace mus | 133 } // namespace mus |
| 137 } // namespace ash | 134 } // namespace ash |
| 138 | 135 |
| 139 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ | 136 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ |
| OLD | NEW |