OLD | NEW |
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 Loading... |
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 |
OLD | NEW |