Chromium Code Reviews| 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/public/interfaces/shelf.mojom.h" | 13 #include "ash/public/interfaces/shelf.mojom.h" |
| 14 #include "ash/public/interfaces/system_tray.mojom.h" | |
| 14 #include "ash/public/interfaces/wallpaper.mojom.h" | 15 #include "ash/public/interfaces/wallpaper.mojom.h" |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 17 #include "mash/session/public/interfaces/session.mojom.h" | 18 #include "mash/session/public/interfaces/session.mojom.h" |
| 18 #include "mojo/public/cpp/bindings/binding.h" | 19 #include "mojo/public/cpp/bindings/binding.h" |
| 19 #include "mojo/public/cpp/bindings/binding_set.h" | 20 #include "mojo/public/cpp/bindings/binding_set.h" |
| 20 #include "services/shell/public/cpp/service.h" | 21 #include "services/shell/public/cpp/service.h" |
| 21 #include "services/tracing/public/cpp/provider.h" | 22 #include "services/tracing/public/cpp/provider.h" |
| 22 #include "services/ui/common/types.h" | 23 #include "services/ui/common/types.h" |
| 23 #include "services/ui/public/interfaces/accelerator_registrar.mojom.h" | 24 #include "services/ui/public/interfaces/accelerator_registrar.mojom.h" |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 46 namespace ash { | 47 namespace ash { |
| 47 namespace mus { | 48 namespace mus { |
| 48 | 49 |
| 49 class AcceleratorRegistrarImpl; | 50 class AcceleratorRegistrarImpl; |
| 50 class NativeWidgetFactoryMus; | 51 class NativeWidgetFactoryMus; |
| 51 class WindowManager; | 52 class WindowManager; |
| 52 | 53 |
| 53 // Hosts the window manager and the ash system user interface for mash. | 54 // Hosts the window manager and the ash system user interface for mash. |
| 54 class WindowManagerApplication | 55 class WindowManagerApplication |
| 55 : public shell::Service, | 56 : public shell::Service, |
| 56 public shell::InterfaceFactory<ash::mojom::ShelfController>, | 57 public shell::InterfaceFactory<ash::mojom::ShelfController>, |
|
James Cook
2016/09/19 22:51:38
Are all these things intentionally left in the ash
sky
2016/09/19 23:47:52
If you mean that ash:: is redundant with the names
| |
| 58 public shell::InterfaceFactory<ash::mojom::SystemTray>, | |
| 57 public shell::InterfaceFactory<ash::mojom::WallpaperController>, | 59 public shell::InterfaceFactory<ash::mojom::WallpaperController>, |
| 58 public shell::InterfaceFactory<ui::mojom::AcceleratorRegistrar>, | 60 public shell::InterfaceFactory<ui::mojom::AcceleratorRegistrar>, |
| 59 public mash::session::mojom::ScreenlockStateListener { | 61 public mash::session::mojom::ScreenlockStateListener { |
| 60 public: | 62 public: |
| 61 WindowManagerApplication(); | 63 WindowManagerApplication(); |
| 62 ~WindowManagerApplication() override; | 64 ~WindowManagerApplication() override; |
| 63 | 65 |
| 64 WindowManager* window_manager() { return window_manager_.get(); } | 66 WindowManager* window_manager() { return window_manager_.get(); } |
| 65 | 67 |
| 66 mash::session::mojom::Session* session() { return session_.get(); } | 68 mash::session::mojom::Session* session() { return session_.get(); } |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 77 | 79 |
| 78 // shell::Service: | 80 // shell::Service: |
| 79 void OnStart(const shell::Identity& identity) override; | 81 void OnStart(const shell::Identity& identity) override; |
| 80 bool OnConnect(const shell::Identity& remote_identity, | 82 bool OnConnect(const shell::Identity& remote_identity, |
| 81 shell::InterfaceRegistry* registry) override; | 83 shell::InterfaceRegistry* registry) override; |
| 82 | 84 |
| 83 // InterfaceFactory<ash::mojom::ShelfController>: | 85 // InterfaceFactory<ash::mojom::ShelfController>: |
| 84 void Create(const shell::Identity& remote_identity, | 86 void Create(const shell::Identity& remote_identity, |
| 85 ash::mojom::ShelfControllerRequest request) override; | 87 ash::mojom::ShelfControllerRequest request) override; |
| 86 | 88 |
| 89 // InterfaceFactory<ash::mojom::SystemTray>: | |
| 90 void Create(const shell::Identity& remote_identity, | |
| 91 ash::mojom::SystemTrayRequest request) override; | |
| 92 | |
| 87 // InterfaceFactory<ash::mojom::WallpaperController>: | 93 // InterfaceFactory<ash::mojom::WallpaperController>: |
| 88 void Create(const shell::Identity& remote_identity, | 94 void Create(const shell::Identity& remote_identity, |
| 89 ash::mojom::WallpaperControllerRequest request) override; | 95 ash::mojom::WallpaperControllerRequest request) override; |
| 90 | 96 |
| 91 // shell::InterfaceFactory<ui::mojom::AcceleratorRegistrar>: | 97 // shell::InterfaceFactory<ui::mojom::AcceleratorRegistrar>: |
| 92 void Create(const shell::Identity& remote_identity, | 98 void Create(const shell::Identity& remote_identity, |
| 93 ui::mojom::AcceleratorRegistrarRequest request) override; | 99 ui::mojom::AcceleratorRegistrarRequest request) override; |
| 94 | 100 |
| 95 // session::mojom::ScreenlockStateListener: | 101 // session::mojom::ScreenlockStateListener: |
| 96 void ScreenlockStateChanged(bool locked) override; | 102 void ScreenlockStateChanged(bool locked) override; |
| 97 | 103 |
| 98 tracing::Provider tracing_; | 104 tracing::Provider tracing_; |
| 99 | 105 |
| 100 std::unique_ptr<views::AuraInit> aura_init_; | 106 std::unique_ptr<views::AuraInit> aura_init_; |
| 101 std::unique_ptr<NativeWidgetFactoryMus> native_widget_factory_mus_; | 107 std::unique_ptr<NativeWidgetFactoryMus> native_widget_factory_mus_; |
| 102 | 108 |
| 103 std::unique_ptr<ui::GpuService> gpu_service_; | 109 std::unique_ptr<ui::GpuService> gpu_service_; |
| 104 std::unique_ptr<views::SurfaceContextFactory> compositor_context_factory_; | 110 std::unique_ptr<views::SurfaceContextFactory> compositor_context_factory_; |
| 105 std::unique_ptr<WindowManager> window_manager_; | 111 std::unique_ptr<WindowManager> window_manager_; |
| 106 | 112 |
| 107 // A blocking pool used by the WindowManager's shell; not used in tests. | 113 // A blocking pool used by the WindowManager's shell; not used in tests. |
| 108 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; | 114 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; |
| 109 | 115 |
| 110 mojo::BindingSet<ash::mojom::ShelfController> shelf_controller_bindings_; | 116 mojo::BindingSet<ash::mojom::ShelfController> shelf_controller_bindings_; |
| 117 mojo::BindingSet<ash::mojom::SystemTray> system_tray_bindings_; | |
| 111 mojo::BindingSet<ash::mojom::WallpaperController> | 118 mojo::BindingSet<ash::mojom::WallpaperController> |
| 112 wallpaper_controller_bindings_; | 119 wallpaper_controller_bindings_; |
| 113 | 120 |
| 114 std::set<AcceleratorRegistrarImpl*> accelerator_registrars_; | 121 std::set<AcceleratorRegistrarImpl*> accelerator_registrars_; |
| 115 | 122 |
| 116 mash::session::mojom::SessionPtr session_; | 123 mash::session::mojom::SessionPtr session_; |
| 117 | 124 |
| 118 mojo::Binding<mash::session::mojom::ScreenlockStateListener> | 125 mojo::Binding<mash::session::mojom::ScreenlockStateListener> |
| 119 screenlock_state_listener_binding_; | 126 screenlock_state_listener_binding_; |
| 120 | 127 |
| 121 #if defined(OS_CHROMEOS) | 128 #if defined(OS_CHROMEOS) |
| 122 std::unique_ptr<chromeos::system::ScopedFakeStatisticsProvider> | 129 std::unique_ptr<chromeos::system::ScopedFakeStatisticsProvider> |
| 123 statistics_provider_; | 130 statistics_provider_; |
| 124 #endif | 131 #endif |
| 125 | 132 |
| 126 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); | 133 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); |
| 127 }; | 134 }; |
| 128 | 135 |
| 129 } // namespace mus | 136 } // namespace mus |
| 130 } // namespace ash | 137 } // namespace ash |
| 131 | 138 |
| 132 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ | 139 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ |
| OLD | NEW |