Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: services/service_manager/tests/lifecycle/app_client.h

Issue 2500683002: Revert of Service Manager: Remove ServiceContext* arg from Service::OnStart() (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 21
22 class AppClient : public Service, 22 class AppClient : public Service,
23 public InterfaceFactory<mojom::LifecycleControl>, 23 public InterfaceFactory<mojom::LifecycleControl>,
24 public mojom::LifecycleControl { 24 public mojom::LifecycleControl {
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 // Service: 31 // Serivce:
32 void OnStart(ServiceContext* context) override;
32 bool OnConnect(const ServiceInfo& remote_info, 33 bool OnConnect(const ServiceInfo& remote_info,
33 InterfaceRegistry* registry) override; 34 InterfaceRegistry* registry) override;
34 bool OnStop() override; 35 bool OnStop() override;
35 36
36 // InterfaceFactory<LifecycleControl>: 37 // InterfaceFactory<LifecycleControl>:
37 void Create(const Identity& remote_identity, 38 void Create(const Identity& remote_identity,
38 mojom::LifecycleControlRequest request) override; 39 mojom::LifecycleControlRequest request) override;
39 40
40 // LifecycleControl: 41 // LifecycleControl:
41 void Ping(const PingCallback& callback) override; 42 void Ping(const PingCallback& callback) override;
42 void GracefulQuit() override; 43 void GracefulQuit() override;
43 void Crash() override; 44 void Crash() override;
44 void CloseServiceManagerConnection() override; 45 void CloseServiceManagerConnection() override;
45 46
46 private: 47 private:
47 class ServiceImpl; 48 class ServiceImpl;
48 49
49 void BindingLost(); 50 void BindingLost();
50 51
52 ServiceContext* context_;
51 ServiceRunner* runner_ = nullptr; 53 ServiceRunner* runner_ = nullptr;
52 mojo::BindingSet<mojom::LifecycleControl> bindings_; 54 mojo::BindingSet<mojom::LifecycleControl> bindings_;
53 55
54 DISALLOW_COPY_AND_ASSIGN(AppClient); 56 DISALLOW_COPY_AND_ASSIGN(AppClient);
55 }; 57 };
56 58
57 } // namespace test 59 } // namespace test
58 } // namespace service_manager 60 } // namespace service_manager
59 61
60 #endif // SERVICES_SERVICE_MANAGER_TESTS_LIFECYCLE_APP_CLIENT_H_ 62 #endif // SERVICES_SERVICE_MANAGER_TESTS_LIFECYCLE_APP_CLIENT_H_
OLDNEW
« no previous file with comments | « services/service_manager/tests/connect/connect_test_package.cc ('k') | services/service_manager/tests/lifecycle/app_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698