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

Side by Side Diff: content/shell/utility/shell_content_utility_client.cc

Issue 2099063002: Migrate RenderProcessHost, ChildThread to InterfaceRegistry/Provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/shell/utility/shell_content_utility_client.h" 5 #include "content/shell/utility/shell_content_utility_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/files/scoped_temp_dir.h" 11 #include "base/files/scoped_temp_dir.h"
12 #include "base/process/process.h" 12 #include "base/process/process.h"
13 #include "content/public/common/service_registry.h"
14 #include "content/public/test/test_mojo_app.h" 13 #include "content/public/test/test_mojo_app.h"
15 #include "content/public/test/test_mojo_service.mojom.h" 14 #include "content/public/test/test_mojo_service.mojom.h"
16 #include "mojo/public/cpp/bindings/strong_binding.h" 15 #include "mojo/public/cpp/bindings/strong_binding.h"
16 #include "services/shell/public/cpp/interface_registry.h"
17 17
18 namespace content { 18 namespace content {
19 19
20 namespace { 20 namespace {
21 21
22 class TestMojoServiceImpl : public mojom::TestMojoService { 22 class TestMojoServiceImpl : public mojom::TestMojoService {
23 public: 23 public:
24 static void Create(mojo::InterfaceRequest<mojom::TestMojoService> request) { 24 static void Create(mojo::InterfaceRequest<mojom::TestMojoService> request) {
25 new TestMojoServiceImpl(std::move(request)); 25 new TestMojoServiceImpl(std::move(request));
26 } 26 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ShellContentUtilityClient::~ShellContentUtilityClient() { 64 ShellContentUtilityClient::~ShellContentUtilityClient() {
65 } 65 }
66 66
67 void ShellContentUtilityClient::RegisterMojoApplications( 67 void ShellContentUtilityClient::RegisterMojoApplications(
68 StaticMojoApplicationMap* apps) { 68 StaticMojoApplicationMap* apps) {
69 MojoApplicationInfo app_info; 69 MojoApplicationInfo app_info;
70 app_info.application_factory = base::Bind(&CreateTestApp); 70 app_info.application_factory = base::Bind(&CreateTestApp);
71 apps->insert(std::make_pair(kTestMojoAppUrl, app_info)); 71 apps->insert(std::make_pair(kTestMojoAppUrl, app_info));
72 } 72 }
73 73
74 void ShellContentUtilityClient::RegisterMojoInterfaces( 74 void ShellContentUtilityClient::ExposeInterfacesToBrowser(
75 shell::InterfaceRegistry* registry) { 75 shell::InterfaceRegistry* registry) {
76 registry->AddInterface(base::Bind(&TestMojoServiceImpl::Create)); 76 registry->AddInterface(base::Bind(&TestMojoServiceImpl::Create));
77 } 77 }
78 78
79 } // namespace content 79 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/utility/shell_content_utility_client.h ('k') | content/utility/utility_process_control_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698