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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/common/mojo/static_loader.h" | 9 #include "content/common/mojo/static_loader.h" |
| 10 #include "content/public/common/service_registry.h" |
10 #include "content/public/test/test_mojo_app.h" | 11 #include "content/public/test/test_mojo_app.h" |
| 12 #include "content/shell/utility/mojo_test_impl.h" |
11 | 13 |
12 namespace content { | 14 namespace content { |
13 | 15 |
14 namespace { | 16 namespace { |
15 | 17 |
16 scoped_ptr<mojo::ShellClient> CreateTestApp() { | 18 scoped_ptr<mojo::ShellClient> CreateTestApp() { |
17 return scoped_ptr<mojo::ShellClient>(new TestMojoApp); | 19 return scoped_ptr<mojo::ShellClient>(new TestMojoApp); |
18 } | 20 } |
19 | 21 |
20 } // namespace | 22 } // namespace |
21 | 23 |
22 ShellContentUtilityClient::~ShellContentUtilityClient() { | 24 ShellContentUtilityClient::~ShellContentUtilityClient() { |
23 } | 25 } |
24 | 26 |
25 void ShellContentUtilityClient::RegisterMojoApplications( | 27 void ShellContentUtilityClient::RegisterMojoApplications( |
26 StaticMojoApplicationMap* apps) { | 28 StaticMojoApplicationMap* apps) { |
27 apps->insert(std::make_pair(kTestMojoAppUrl, base::Bind(&CreateTestApp))); | 29 apps->insert(std::make_pair(kTestMojoAppUrl, base::Bind(&CreateTestApp))); |
28 } | 30 } |
29 | 31 |
| 32 void ShellContentUtilityClient::RegisterMojoServices( |
| 33 ServiceRegistry* registry) { |
| 34 registry->AddService<mojom::MojoTest>( |
| 35 base::Bind(&MojoTestImpl::CreateMojoTestImpl)); |
| 36 } |
| 37 |
30 } // namespace content | 38 } // namespace content |
OLD | NEW |