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

Side by Side Diff: content/common/service_manager/service_manager_connection_impl.cc

Issue 2427443002: Replace remaining shell references with service manager (Closed)
Patch Set: Created 4 years, 2 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 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 #include "content/common/service_manager/service_manager_connection_impl.h" 5 #include "content/common/service_manager/service_manager_connection_impl.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 id_ = identity; 224 id_ = identity;
225 225
226 InitializeCallback handler = base::ResetAndReturn(&initialize_handler_); 226 InitializeCallback handler = base::ResetAndReturn(&initialize_handler_);
227 callback_task_runner_->PostTask(FROM_HERE, base::Bind(handler, identity)); 227 callback_task_runner_->PostTask(FROM_HERE, base::Bind(handler, identity));
228 } 228 }
229 229
230 bool OnConnect(const service_manager::Identity& remote_identity, 230 bool OnConnect(const service_manager::Identity& remote_identity,
231 service_manager::InterfaceRegistry* registry) override { 231 service_manager::InterfaceRegistry* registry) override {
232 DCHECK(io_thread_checker_.CalledOnValidThread()); 232 DCHECK(io_thread_checker_.CalledOnValidThread());
233 std::string remote_service = remote_identity.name(); 233 std::string remote_service = remote_identity.name();
234 if (remote_service == "service:shell") { 234 if (remote_service == "service:service_manager") {
235 // Only expose the SCF interface to the shell. 235 // Only expose the ServiceFactory interface to the Service Manager.
236 registry->AddInterface<service_manager::mojom::ServiceFactory>(this); 236 registry->AddInterface<service_manager::mojom::ServiceFactory>(this);
237 return true; 237 return true;
238 } 238 }
239 239
240 bool accept = false; 240 bool accept = false;
241 { 241 {
242 base::AutoLock lock(lock_); 242 base::AutoLock lock(lock_);
243 for (auto& entry : connection_filters_) { 243 for (auto& entry : connection_filters_) {
244 accept |= entry.second->OnConnect(remote_identity, registry, 244 accept |= entry.second->OnConnect(remote_identity, registry,
245 service_context_->connector()); 245 service_context_->connector());
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 502
503 void ServiceManagerConnectionImpl::GetInterface( 503 void ServiceManagerConnectionImpl::GetInterface(
504 service_manager::mojom::InterfaceProvider* provider, 504 service_manager::mojom::InterfaceProvider* provider,
505 const std::string& interface_name, 505 const std::string& interface_name,
506 mojo::ScopedMessagePipeHandle request_handle) { 506 mojo::ScopedMessagePipeHandle request_handle) {
507 provider->GetInterface(interface_name, std::move(request_handle)); 507 provider->GetInterface(interface_name, std::move(request_handle));
508 } 508 }
509 509
510 } // namespace content 510 } // namespace content
511 511
OLDNEW
« no previous file with comments | « content/common/service_manager/embedded_service_runner.cc ('k') | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698