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