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

Side by Side Diff: content/child/mojo/mojo_application.cc

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 "content/child/mojo/mojo_application.h" 5 #include "content/child/mojo/mojo_application.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/common/application_setup.mojom.h" 10 #include "content/common/application_setup.mojom.h"
11 #include "mojo/edk/embedder/embedder.h" 11 #include "mojo/edk/embedder/embedder.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 MojoApplication::MojoApplication() { 15 MojoApplication::MojoApplication() {
16 } 16 }
17 17
18 MojoApplication::~MojoApplication() { 18 MojoApplication::~MojoApplication() {
19 } 19 }
20 20
21 void MojoApplication::InitWithToken(const std::string& token) { 21 void MojoApplication::InitWithToken(const std::string& token) {
22 mojo::ScopedMessagePipeHandle handle = 22 mojo::ScopedMessagePipeHandle handle =
23 mojo::edk::CreateChildMessagePipe(token); 23 mojo::edk::CreateChildMessagePipe(token);
24 DCHECK(handle.is_valid()); 24 DCHECK(handle.is_valid());
25 25
26 mojom::ApplicationSetupPtr application_setup; 26 mojom::ApplicationSetupPtr application_setup;
27 application_setup.Bind( 27 application_setup.Bind(
28 mojo::InterfacePtrInfo<mojom::ApplicationSetup>(std::move(handle), 0u)); 28 mojo::InterfacePtrInfo<mojom::ApplicationSetup>(std::move(handle), 0u));
29 29
30 mojo::shell::mojom::InterfaceProviderPtr services; 30 shell::mojom::InterfaceProviderPtr services;
31 mojo::shell::mojom::InterfaceProviderPtr exposed_services; 31 shell::mojom::InterfaceProviderPtr exposed_services;
32 service_registry_.Bind(GetProxy(&exposed_services)); 32 service_registry_.Bind(GetProxy(&exposed_services));
33 application_setup->ExchangeInterfaceProviders(GetProxy(&services), 33 application_setup->ExchangeInterfaceProviders(GetProxy(&services),
34 std::move(exposed_services)); 34 std::move(exposed_services));
35 service_registry_.BindRemoteServiceProvider(std::move(services)); 35 service_registry_.BindRemoteServiceProvider(std::move(services));
36 } 36 }
37 37
38 } // namespace content 38 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/embedded_worker_test_helper.cc ('k') | content/child/process_control_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698