| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "services/service_manager/public/cpp/service.h" | 5 #include "services/service_manager/public/cpp/service.h" |
| 6 | 6 |
| 7 #include "services/service_manager/public/cpp/service_context.h" | 7 #include "services/service_manager/public/cpp/service_context.h" |
| 8 #include "services/service_manager/public/cpp/service_info.h" |
| 8 | 9 |
| 9 namespace service_manager { | 10 namespace service_manager { |
| 10 | 11 |
| 11 Service::Service() {} | 12 Service::Service() {} |
| 12 Service::~Service() {} | 13 Service::~Service() {} |
| 13 | 14 |
| 14 void Service::OnStart(const Identity& identity) {} | 15 void Service::OnStart(const ServiceInfo& info) {} |
| 15 | 16 |
| 16 bool Service::OnConnect(const Identity& remote_identity, | 17 bool Service::OnConnect(const ServiceInfo& remote_info, |
| 17 InterfaceRegistry* registry) { | 18 InterfaceRegistry* registry) { |
| 18 return false; | 19 return false; |
| 19 } | 20 } |
| 20 | 21 |
| 21 bool Service::OnStop() { return true; } | 22 bool Service::OnStop() { return true; } |
| 22 | 23 |
| 23 Connector* Service::connector() { | 24 Connector* Service::connector() { |
| 24 return context_->connector(); | 25 return context_->connector(); |
| 25 } | 26 } |
| 26 | 27 |
| 27 ServiceContext* Service::context() { | 28 ServiceContext* Service::context() { |
| 28 return context_.get(); | 29 return context_.get(); |
| 29 } | 30 } |
| 30 | 31 |
| 31 void Service::set_context(std::unique_ptr<ServiceContext> context) { | 32 void Service::set_context(std::unique_ptr<ServiceContext> context) { |
| 32 context_ = std::move(context); | 33 context_ = std::move(context); |
| 33 } | 34 } |
| 34 | 35 |
| 35 } // namespace service_manager | 36 } // namespace service_manager |
| OLD | NEW |