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 SERVICES_SERVICE_MANAGER_TESTS_LIFECYCLE_APP_CLIENT_H_ | 5 #ifndef SERVICES_SERVICE_MANAGER_TESTS_LIFECYCLE_APP_CLIENT_H_ |
6 #define SERVICES_SERVICE_MANAGER_TESTS_LIFECYCLE_APP_CLIENT_H_ | 6 #define SERVICES_SERVICE_MANAGER_TESTS_LIFECYCLE_APP_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class AppClient : public Service, | 23 class AppClient : public Service, |
24 public InterfaceFactory<mojom::LifecycleControl>, | 24 public InterfaceFactory<mojom::LifecycleControl>, |
25 public mojom::LifecycleControl { | 25 public mojom::LifecycleControl { |
26 public: | 26 public: |
27 AppClient(); | 27 AppClient(); |
28 ~AppClient() override; | 28 ~AppClient() override; |
29 | 29 |
30 void set_runner(ServiceRunner* runner) { runner_ = runner; } | 30 void set_runner(ServiceRunner* runner) { runner_ = runner; } |
31 | 31 |
32 // Service: | 32 // Service: |
33 void OnBindInterface(const ServiceInfo& source_info, | 33 void OnBindInterface(const BindSourceInfo& source_info, |
34 const std::string& interface_name, | 34 const std::string& interface_name, |
35 mojo::ScopedMessagePipeHandle interface_pipe) override; | 35 mojo::ScopedMessagePipeHandle interface_pipe) override; |
36 bool OnServiceManagerConnectionLost() override; | 36 bool OnServiceManagerConnectionLost() override; |
37 | 37 |
38 // InterfaceFactory<LifecycleControl>: | 38 // InterfaceFactory<LifecycleControl>: |
39 void Create(const Identity& remote_identity, | 39 void Create(const Identity& remote_identity, |
40 mojom::LifecycleControlRequest request) override; | 40 mojom::LifecycleControlRequest request) override; |
41 | 41 |
42 // LifecycleControl: | 42 // LifecycleControl: |
43 void Ping(const PingCallback& callback) override; | 43 void Ping(const PingCallback& callback) override; |
(...skipping 10 matching lines...) Expand all Loading... |
54 BinderRegistry registry_; | 54 BinderRegistry registry_; |
55 mojo::BindingSet<mojom::LifecycleControl> bindings_; | 55 mojo::BindingSet<mojom::LifecycleControl> bindings_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(AppClient); | 57 DISALLOW_COPY_AND_ASSIGN(AppClient); |
58 }; | 58 }; |
59 | 59 |
60 } // namespace test | 60 } // namespace test |
61 } // namespace service_manager | 61 } // namespace service_manager |
62 | 62 |
63 #endif // SERVICES_SERVICE_MANAGER_TESTS_LIFECYCLE_APP_CLIENT_H_ | 63 #endif // SERVICES_SERVICE_MANAGER_TESTS_LIFECYCLE_APP_CLIENT_H_ |
OLD | NEW |