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

Side by Side Diff: services/shell/public/cpp/lib/service.cc

Issue 2179023004: Make Service own ServiceContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 months 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 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/shell/public/cpp/service.h" 5 #include "services/shell/public/cpp/service.h"
6 6
7 #include "services/shell/public/cpp/service_context.h"
8
7 namespace shell { 9 namespace shell {
8 10
9 Service::Service() {} 11 Service::Service() {}
10 Service::~Service() {} 12 Service::~Service() {}
11 13
12 void Service::OnStart(Connector* connector, const Identity& identity, 14 void Service::OnStart(const Identity& identity) {}
13 uint32_t id) {
14 }
15 15
16 bool Service::OnConnect(Connection* connection) { 16 bool Service::OnConnect(Connection* connection) {
17 return false; 17 return false;
18 } 18 }
19 19
20 bool Service::OnStop() { return true; } 20 bool Service::OnStop() { return true; }
21 21
22 InterfaceProvider* Service::GetInterfaceProviderForConnection() { 22 InterfaceProvider* Service::GetInterfaceProviderForConnection() {
23 return nullptr; 23 return nullptr;
24 } 24 }
25 25
26 InterfaceRegistry* Service::GetInterfaceRegistryForConnection() { 26 InterfaceRegistry* Service::GetInterfaceRegistryForConnection() {
27 return nullptr; 27 return nullptr;
28 } 28 }
29 29
30 Connector* Service::connector() {
31 return context_->connector();
32 }
33
34 ServiceContext* Service::context() {
35 return context_.get();
36 }
37
38 void Service::set_context(std::unique_ptr<ServiceContext> context) {
39 context_ = std::move(context);
40 }
41
30 } // namespace shell 42 } // namespace shell
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_media_application.cc ('k') | services/shell/public/cpp/lib/service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698