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

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

Issue 2696233002: Mojo C++ bindings: remove some usage of AssociatedGroup from user code. (Closed)
Patch Set: . Created 3 years, 10 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/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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 QuitNow(); 74 QuitNow();
75 service_.reset(); 75 service_.reset();
76 } 76 }
77 77
78 //////////////////////////////////////////////////////////////////////////////// 78 ////////////////////////////////////////////////////////////////////////////////
79 // ServiceContext, mojom::Service implementation: 79 // ServiceContext, mojom::Service implementation:
80 80
81 void ServiceContext::OnStart(const ServiceInfo& info, 81 void ServiceContext::OnStart(const ServiceInfo& info,
82 const OnStartCallback& callback) { 82 const OnStartCallback& callback) {
83 local_info_ = info; 83 local_info_ = info;
84 callback.Run( 84 callback.Run(std::move(pending_connector_request_),
85 std::move(pending_connector_request_), 85 mojo::MakeRequest(&service_control_));
86 mojo::MakeRequest(&service_control_, binding_.associated_group()));
87 86
88 service_->set_context(this); 87 service_->set_context(this);
89 service_->OnStart(); 88 service_->OnStart();
90 } 89 }
91 90
92 void ServiceContext::OnConnect( 91 void ServiceContext::OnConnect(
93 const ServiceInfo& source_info, 92 const ServiceInfo& source_info,
94 mojom::InterfaceProviderRequest interfaces, 93 mojom::InterfaceProviderRequest interfaces,
95 const OnConnectCallback& callback) { 94 const OnConnectCallback& callback) {
96 InterfaceProviderSpec source_spec, target_spec; 95 InterfaceProviderSpec source_spec, target_spec;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 166 }
168 167
169 void ServiceContext::DestroyConnectionInterfaceRegistry( 168 void ServiceContext::DestroyConnectionInterfaceRegistry(
170 InterfaceRegistry* registry) { 169 InterfaceRegistry* registry) {
171 auto it = connection_interface_registries_.find(registry); 170 auto it = connection_interface_registries_.find(registry);
172 CHECK(it != connection_interface_registries_.end()); 171 CHECK(it != connection_interface_registries_.end());
173 connection_interface_registries_.erase(it); 172 connection_interface_registries_.erase(it);
174 } 173 }
175 174
176 } // namespace service_manager 175 } // namespace service_manager
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/sync_method_unittest.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698