| 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 14 matching lines...) Expand all  Loading... | 
|  25  public: |  25  public: | 
|  26   AppClient(); |  26   AppClient(); | 
|  27   ~AppClient() override; |  27   ~AppClient() override; | 
|  28  |  28  | 
|  29   void set_runner(ServiceRunner* runner) { runner_ = runner; } |  29   void set_runner(ServiceRunner* runner) { runner_ = runner; } | 
|  30  |  30  | 
|  31   // Serivce: |  31   // Serivce: | 
|  32   void OnStart(ServiceContext* context) override; |  32   void OnStart(ServiceContext* context) override; | 
|  33   bool OnConnect(const ServiceInfo& remote_info, |  33   bool OnConnect(const ServiceInfo& remote_info, | 
|  34                  InterfaceRegistry* registry) override; |  34                  InterfaceRegistry* registry) override; | 
|  35   bool OnStop() override; |  | 
|  36  |  35  | 
|  37   // InterfaceFactory<LifecycleControl>: |  36   // InterfaceFactory<LifecycleControl>: | 
|  38   void Create(const Identity& remote_identity, |  37   void Create(const Identity& remote_identity, | 
|  39               mojom::LifecycleControlRequest request) override; |  38               mojom::LifecycleControlRequest request) override; | 
|  40  |  39  | 
|  41   // LifecycleControl: |  40   // LifecycleControl: | 
|  42   void Ping(const PingCallback& callback) override; |  41   void Ping(const PingCallback& callback) override; | 
|  43   void GracefulQuit() override; |  42   void GracefulQuit() override; | 
|  44   void Crash() override; |  43   void Crash() override; | 
|  45   void CloseServiceManagerConnection() override; |  44   void CloseServiceManagerConnection() override; | 
|  46  |  45  | 
|  47  private: |  46  private: | 
|  48   class ServiceImpl; |  47   class ServiceImpl; | 
|  49  |  48  | 
|  50   void BindingLost(); |  49   void BindingLost(); | 
|  51  |  50  | 
|  52   ServiceContext* context_; |  51   ServiceContext* context_; | 
|  53   ServiceRunner* runner_ = nullptr; |  52   ServiceRunner* runner_ = nullptr; | 
|  54   mojo::BindingSet<mojom::LifecycleControl> bindings_; |  53   mojo::BindingSet<mojom::LifecycleControl> bindings_; | 
|  55  |  54  | 
|  56   DISALLOW_COPY_AND_ASSIGN(AppClient); |  55   DISALLOW_COPY_AND_ASSIGN(AppClient); | 
|  57 }; |  56 }; | 
|  58  |  57  | 
|  59 }  // namespace test |  58 }  // namespace test | 
|  60 }  // namespace service_manager |  59 }  // namespace service_manager | 
|  61  |  60  | 
|  62 #endif  // SERVICES_SERVICE_MANAGER_TESTS_LIFECYCLE_APP_CLIENT_H_ |  61 #endif  // SERVICES_SERVICE_MANAGER_TESTS_LIFECYCLE_APP_CLIENT_H_ | 
| OLD | NEW |