| 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 "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" |
| 15 #include "mash/session/public/interfaces/session.mojom.h" | 16 #include "mash/session/public/interfaces/session.mojom.h" |
| 16 #include "mojo/public/cpp/bindings/binding.h" | 17 #include "mojo/public/cpp/bindings/binding.h" |
| 17 #include "mojo/public/cpp/bindings/binding_set.h" | 18 #include "mojo/public/cpp/bindings/binding_set.h" |
| 18 #include "services/shell/public/cpp/service.h" | 19 #include "services/shell/public/cpp/service.h" |
| 19 #include "services/tracing/public/cpp/provider.h" | 20 #include "services/tracing/public/cpp/provider.h" |
| 20 #include "services/ui/common/types.h" | 21 #include "services/ui/common/types.h" |
| 21 #include "services/ui/public/interfaces/accelerator_registrar.mojom.h" | 22 #include "services/ui/public/interfaces/accelerator_registrar.mojom.h" |
| 22 | 23 |
| 24 namespace base { |
| 25 class SequencedWorkerPool; |
| 26 } |
| 27 |
| 23 namespace chromeos { | 28 namespace chromeos { |
| 24 namespace system { | 29 namespace system { |
| 25 class ScopedFakeStatisticsProvider; | 30 class ScopedFakeStatisticsProvider; |
| 26 } | 31 } |
| 27 } | 32 } |
| 28 | 33 |
| 29 namespace views { | 34 namespace views { |
| 30 class AuraInit; | 35 class AuraInit; |
| 31 class SurfaceContextFactory; | 36 class SurfaceContextFactory; |
| 32 } | 37 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 59 | 64 |
| 60 mash::session::mojom::Session* session() { return session_.get(); } | 65 mash::session::mojom::Session* session() { return session_.get(); } |
| 61 | 66 |
| 62 private: | 67 private: |
| 63 friend class WmTestBase; | 68 friend class WmTestBase; |
| 64 friend class WmTestHelper; | 69 friend class WmTestHelper; |
| 65 | 70 |
| 66 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar); | 71 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar); |
| 67 | 72 |
| 68 void InitWindowManager( | 73 void InitWindowManager( |
| 69 std::unique_ptr<ui::WindowTreeClient> window_tree_client); | 74 std::unique_ptr<ui::WindowTreeClient> window_tree_client, |
| 75 const scoped_refptr<base::SequencedWorkerPool>& blocking_pool); |
| 70 | 76 |
| 71 // shell::Service: | 77 // shell::Service: |
| 72 void OnStart(const shell::Identity& identity) override; | 78 void OnStart(const shell::Identity& identity) override; |
| 73 bool OnConnect(const shell::Identity& remote_identity, | 79 bool OnConnect(const shell::Identity& remote_identity, |
| 74 shell::InterfaceRegistry* registry) override; | 80 shell::InterfaceRegistry* registry) override; |
| 75 | 81 |
| 76 // InterfaceFactory<ash::mojom::ShelfController>: | 82 // InterfaceFactory<ash::mojom::ShelfController>: |
| 77 void Create(const shell::Identity& remote_identity, | 83 void Create(const shell::Identity& remote_identity, |
| 78 ash::mojom::ShelfControllerRequest request) override; | 84 ash::mojom::ShelfControllerRequest request) override; |
| 79 | 85 |
| 80 // shell::InterfaceFactory<ui::mojom::AcceleratorRegistrar>: | 86 // shell::InterfaceFactory<ui::mojom::AcceleratorRegistrar>: |
| 81 void Create(const shell::Identity& remote_identity, | 87 void Create(const shell::Identity& remote_identity, |
| 82 ui::mojom::AcceleratorRegistrarRequest request) override; | 88 ui::mojom::AcceleratorRegistrarRequest request) override; |
| 83 | 89 |
| 84 // session::mojom::ScreenlockStateListener: | 90 // session::mojom::ScreenlockStateListener: |
| 85 void ScreenlockStateChanged(bool locked) override; | 91 void ScreenlockStateChanged(bool locked) override; |
| 86 | 92 |
| 87 tracing::Provider tracing_; | 93 tracing::Provider tracing_; |
| 88 | 94 |
| 89 std::unique_ptr<views::AuraInit> aura_init_; | 95 std::unique_ptr<views::AuraInit> aura_init_; |
| 90 std::unique_ptr<NativeWidgetFactoryMus> native_widget_factory_mus_; | 96 std::unique_ptr<NativeWidgetFactoryMus> native_widget_factory_mus_; |
| 91 | 97 |
| 92 std::unique_ptr<ui::GpuService> gpu_service_; | 98 std::unique_ptr<ui::GpuService> gpu_service_; |
| 93 std::unique_ptr<views::SurfaceContextFactory> compositor_context_factory_; | 99 std::unique_ptr<views::SurfaceContextFactory> compositor_context_factory_; |
| 94 std::unique_ptr<WindowManager> window_manager_; | 100 std::unique_ptr<WindowManager> window_manager_; |
| 95 | 101 |
| 102 // A blocking pool used by the WindowManager's shell; not used in tests. |
| 103 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; |
| 104 |
| 96 mojo::BindingSet<ash::mojom::ShelfController> shelf_controller_bindings_; | 105 mojo::BindingSet<ash::mojom::ShelfController> shelf_controller_bindings_; |
| 97 | 106 |
| 98 std::set<AcceleratorRegistrarImpl*> accelerator_registrars_; | 107 std::set<AcceleratorRegistrarImpl*> accelerator_registrars_; |
| 99 | 108 |
| 100 mash::session::mojom::SessionPtr session_; | 109 mash::session::mojom::SessionPtr session_; |
| 101 | 110 |
| 102 mojo::Binding<mash::session::mojom::ScreenlockStateListener> | 111 mojo::Binding<mash::session::mojom::ScreenlockStateListener> |
| 103 screenlock_state_listener_binding_; | 112 screenlock_state_listener_binding_; |
| 104 | 113 |
| 105 #if defined(OS_CHROMEOS) | 114 #if defined(OS_CHROMEOS) |
| 106 std::unique_ptr<chromeos::system::ScopedFakeStatisticsProvider> | 115 std::unique_ptr<chromeos::system::ScopedFakeStatisticsProvider> |
| 107 statistics_provider_; | 116 statistics_provider_; |
| 108 #endif | 117 #endif |
| 109 | 118 |
| 110 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); | 119 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); |
| 111 }; | 120 }; |
| 112 | 121 |
| 113 } // namespace mus | 122 } // namespace mus |
| 114 } // namespace ash | 123 } // namespace ash |
| 115 | 124 |
| 116 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ | 125 #endif // ASH_MUS_WINDOW_MANAGER_APPLICATION_H_ |
| OLD | NEW |