| 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_AUTOCLICK_MUS_AUTOCLICK_APPLICATION_H_ | 5 #ifndef ASH_AUTOCLICK_MUS_AUTOCLICK_APPLICATION_H_ |
| 6 #define ASH_AUTOCLICK_MUS_AUTOCLICK_APPLICATION_H_ | 6 #define ASH_AUTOCLICK_MUS_AUTOCLICK_APPLICATION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "ash/autoclick/common/autoclick_controller_common.h" | 10 #include "ash/autoclick/common/autoclick_controller_common.h" |
| 11 #include "ash/autoclick/common/autoclick_controller_common_delegate.h" | 11 #include "ash/autoclick/common/autoclick_controller_common_delegate.h" |
| 12 #include "ash/autoclick/mus/public/interfaces/autoclick.mojom.h" | 12 #include "ash/autoclick/mus/public/interfaces/autoclick.mojom.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "mash/public/interfaces/launchable.mojom.h" | 14 #include "mash/public/interfaces/launchable.mojom.h" |
| 15 #include "mojo/public/cpp/bindings/binding.h" | 15 #include "mojo/public/cpp/bindings/binding.h" |
| 16 #include "services/service_manager/public/cpp/identity.h" |
| 17 #include "services/service_manager/public/cpp/interface_registry.h" |
| 16 #include "services/service_manager/public/cpp/service.h" | 18 #include "services/service_manager/public/cpp/service.h" |
| 17 | 19 |
| 18 namespace views { | 20 namespace views { |
| 19 class AuraInit; | 21 class AuraInit; |
| 20 class Widget; | 22 class Widget; |
| 21 class WindowManagerConnection; | 23 class WindowManagerConnection; |
| 22 } | 24 } |
| 23 | 25 |
| 24 namespace ash { | 26 namespace ash { |
| 25 namespace autoclick { | 27 namespace autoclick { |
| 26 | 28 |
| 27 class AutoclickApplication | 29 class AutoclickApplication |
| 28 : public service_manager::Service, | 30 : public service_manager::Service, |
| 29 public mash::mojom::Launchable, | 31 public mash::mojom::Launchable, |
| 30 public mojom::AutoclickController, | 32 public mojom::AutoclickController, |
| 31 public service_manager::InterfaceFactory<mash::mojom::Launchable>, | 33 public service_manager::InterfaceFactory<mash::mojom::Launchable>, |
| 32 public service_manager::InterfaceFactory<mojom::AutoclickController>, | 34 public service_manager::InterfaceFactory<mojom::AutoclickController>, |
| 33 public AutoclickControllerCommonDelegate { | 35 public AutoclickControllerCommonDelegate { |
| 34 public: | 36 public: |
| 35 AutoclickApplication(); | 37 AutoclickApplication(); |
| 36 ~AutoclickApplication() override; | 38 ~AutoclickApplication() override; |
| 37 | 39 |
| 38 private: | 40 private: |
| 39 // service_manager::Service: | 41 // service_manager::Service: |
| 40 void OnStart(const service_manager::ServiceInfo& info) override; | 42 void OnStart(service_manager::ServiceContext* context) override; |
| 41 bool OnConnect(const service_manager::ServiceInfo& remote_info, | 43 bool OnConnect(const service_manager::ServiceInfo& remote_info, |
| 42 service_manager::InterfaceRegistry* registry) override; | 44 service_manager::InterfaceRegistry* registry) override; |
| 43 | 45 |
| 44 // mojom::Launchable: | 46 // mojom::Launchable: |
| 45 void Launch(uint32_t what, mash::mojom::LaunchMode how) override; | 47 void Launch(uint32_t what, mash::mojom::LaunchMode how) override; |
| 46 | 48 |
| 47 // mojom::AutoclickController: | 49 // mojom::AutoclickController: |
| 48 void SetAutoclickDelay(uint32_t delay_in_milliseconds) override; | 50 void SetAutoclickDelay(uint32_t delay_in_milliseconds) override; |
| 49 | 51 |
| 50 // service_manager::InterfaceFactory<mojom::Launchable>: | 52 // service_manager::InterfaceFactory<mojom::Launchable>: |
| (...skipping 21 matching lines...) Expand all Loading... |
| 72 std::unique_ptr<AutoclickControllerCommon> autoclick_controller_common_; | 74 std::unique_ptr<AutoclickControllerCommon> autoclick_controller_common_; |
| 73 std::unique_ptr<views::Widget> widget_; | 75 std::unique_ptr<views::Widget> widget_; |
| 74 | 76 |
| 75 DISALLOW_COPY_AND_ASSIGN(AutoclickApplication); | 77 DISALLOW_COPY_AND_ASSIGN(AutoclickApplication); |
| 76 }; | 78 }; |
| 77 | 79 |
| 78 } // namespace autoclick | 80 } // namespace autoclick |
| 79 } // namespace ash | 81 } // namespace ash |
| 80 | 82 |
| 81 #endif // ASH_AUTOCLICK_MUS_AUTOCLICK_APPLICATION_H_ | 83 #endif // ASH_AUTOCLICK_MUS_AUTOCLICK_APPLICATION_H_ |
| OLD | NEW |