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

Side by Side Diff: services/service_manager/public/cpp/lib/service_context.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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/service_manager/public/cpp/service_context.h" 5 #include "services/service_manager/public/cpp/service_context.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 QuitNow(); 72 QuitNow();
73 service_.reset(); 73 service_.reset();
74 } 74 }
75 75
76 //////////////////////////////////////////////////////////////////////////////// 76 ////////////////////////////////////////////////////////////////////////////////
77 // ServiceContext, mojom::Service implementation: 77 // ServiceContext, mojom::Service implementation:
78 78
79 void ServiceContext::OnStart(const ServiceInfo& info, 79 void ServiceContext::OnStart(const ServiceInfo& info,
80 const OnStartCallback& callback) { 80 const OnStartCallback& callback) {
81 local_info_ = info; 81 local_info_ = info;
82 callback.Run(std::move(pending_connector_request_), 82 callback.Run(
83 mojo::GetProxy(&service_control_, binding_.associated_group())); 83 std::move(pending_connector_request_),
84 mojo::MakeRequest(&service_control_, binding_.associated_group()));
84 85
85 service_->set_context(this); 86 service_->set_context(this);
86 service_->OnStart(); 87 service_->OnStart();
87 } 88 }
88 89
89 void ServiceContext::OnConnect( 90 void ServiceContext::OnConnect(
90 const ServiceInfo& source_info, 91 const ServiceInfo& source_info,
91 mojom::InterfaceProviderRequest interfaces, 92 mojom::InterfaceProviderRequest interfaces,
92 const OnConnectCallback& callback) { 93 const OnConnectCallback& callback) {
93 InterfaceProviderSpec source_spec, target_spec; 94 InterfaceProviderSpec source_spec, target_spec;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 145 }
145 146
146 void ServiceContext::DestroyConnectionInterfaceRegistry( 147 void ServiceContext::DestroyConnectionInterfaceRegistry(
147 InterfaceRegistry* registry) { 148 InterfaceRegistry* registry) {
148 auto it = connection_interface_registries_.find(registry); 149 auto it = connection_interface_registries_.find(registry);
149 CHECK(it != connection_interface_registries_.end()); 150 CHECK(it != connection_interface_registries_.end());
150 connection_interface_registries_.erase(it); 151 connection_interface_registries_.erase(it);
151 } 152 }
152 153
153 } // namespace service_manager 154 } // namespace service_manager
OLDNEW
« no previous file with comments | « services/service_manager/public/cpp/lib/interface_provider.cc ('k') | services/service_manager/service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698