| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SYSUI_SYSUI_APPLICATION_H_ | 5 #ifndef ASH_SYSUI_SYSUI_APPLICATION_H_ |
| 6 #define ASH_SYSUI_SYSUI_APPLICATION_H_ | 6 #define ASH_SYSUI_SYSUI_APPLICATION_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/sysui/public/interfaces/wallpaper.mojom.h" | 10 #include "ash/sysui/public/interfaces/wallpaper.mojom.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "mash/shelf/public/interfaces/shelf.mojom.h" | 12 #include "mash/shelf/public/interfaces/shelf.mojom.h" |
| 13 #include "mojo/public/cpp/bindings/binding_set.h" | 13 #include "mojo/public/cpp/bindings/binding_set.h" |
| 14 #include "services/shell/public/cpp/service.h" | 14 #include "services/shell/public/cpp/service.h" |
| 15 #include "services/tracing/public/cpp/tracing_impl.h" | 15 #include "services/tracing/public/cpp/provider.h" |
| 16 #include "services/ui/public/cpp/input_devices/input_device_client.h" | 16 #include "services/ui/public/cpp/input_devices/input_device_client.h" |
| 17 | 17 |
| 18 namespace ash { | 18 namespace ash { |
| 19 namespace sysui { | 19 namespace sysui { |
| 20 | 20 |
| 21 class AshInit; | 21 class AshInit; |
| 22 | 22 |
| 23 class SysUIApplication | 23 class SysUIApplication |
| 24 : public shell::Service, | 24 : public shell::Service, |
| 25 public shell::InterfaceFactory<mash::shelf::mojom::ShelfController>, | 25 public shell::InterfaceFactory<mash::shelf::mojom::ShelfController>, |
| 26 public shell::InterfaceFactory<mojom::WallpaperController> { | 26 public shell::InterfaceFactory<mojom::WallpaperController> { |
| 27 public: | 27 public: |
| 28 SysUIApplication(); | 28 SysUIApplication(); |
| 29 ~SysUIApplication() override; | 29 ~SysUIApplication() override; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 // shell::Service: | 32 // shell::Service: |
| 33 void OnStart(const ::shell::Identity& identity) override; | 33 void OnStart(const ::shell::Identity& identity) override; |
| 34 bool OnConnect(shell::Connection* connection) override; | 34 bool OnConnect(shell::Connection* connection) override; |
| 35 | 35 |
| 36 // InterfaceFactory<mash::shelf::mojom::ShelfController>: | 36 // InterfaceFactory<mash::shelf::mojom::ShelfController>: |
| 37 void Create(const shell::Identity& remote_identity, | 37 void Create(const shell::Identity& remote_identity, |
| 38 mash::shelf::mojom::ShelfControllerRequest request) override; | 38 mash::shelf::mojom::ShelfControllerRequest request) override; |
| 39 | 39 |
| 40 // InterfaceFactory<mojom::WallpaperController>: | 40 // InterfaceFactory<mojom::WallpaperController>: |
| 41 void Create(const shell::Identity& remote_identity, | 41 void Create(const shell::Identity& remote_identity, |
| 42 mojom::WallpaperControllerRequest request) override; | 42 mojom::WallpaperControllerRequest request) override; |
| 43 | 43 |
| 44 mojo::TracingImpl tracing_; | 44 tracing::Provider tracing_; |
| 45 std::unique_ptr<AshInit> ash_init_; | 45 std::unique_ptr<AshInit> ash_init_; |
| 46 | 46 |
| 47 mojo::BindingSet<mash::shelf::mojom::ShelfController> | 47 mojo::BindingSet<mash::shelf::mojom::ShelfController> |
| 48 shelf_controller_bindings_; | 48 shelf_controller_bindings_; |
| 49 mojo::BindingSet<mojom::WallpaperController> wallpaper_controller_bindings_; | 49 mojo::BindingSet<mojom::WallpaperController> wallpaper_controller_bindings_; |
| 50 | 50 |
| 51 // Subscribes to updates about input-devices. | 51 // Subscribes to updates about input-devices. |
| 52 ui::InputDeviceClient input_device_client_; | 52 ui::InputDeviceClient input_device_client_; |
| 53 | 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(SysUIApplication); | 54 DISALLOW_COPY_AND_ASSIGN(SysUIApplication); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace sysui | 57 } // namespace sysui |
| 58 } // namespace ash | 58 } // namespace ash |
| 59 | 59 |
| 60 #endif // ASH_SYSUI_SYSUI_APPLICATION_H_ | 60 #endif // ASH_SYSUI_SYSUI_APPLICATION_H_ |
| OLD | NEW |