| 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" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 std::unique_ptr<shell::Service> CreateTestService( | 69 std::unique_ptr<shell::Service> CreateTestService( |
| 70 const base::Closure& quit_closure) { | 70 const base::Closure& quit_closure) { |
| 71 return std::unique_ptr<shell::Service>(new TestService); | 71 return std::unique_ptr<shell::Service>(new TestService); |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace | 74 } // namespace |
| 75 | 75 |
| 76 ShellContentUtilityClient::~ShellContentUtilityClient() { | 76 ShellContentUtilityClient::~ShellContentUtilityClient() { |
| 77 } | 77 } |
| 78 | 78 |
| 79 void ShellContentUtilityClient::RegisterMojoApplications( | 79 void ShellContentUtilityClient::RegisterServices(StaticServiceMap* services) { |
| 80 StaticMojoApplicationMap* apps) { | 80 ServiceInfo info; |
| 81 MojoApplicationInfo app_info; | 81 info.factory = base::Bind(&CreateTestService); |
| 82 app_info.application_factory = base::Bind(&CreateTestService); | 82 services->insert(std::make_pair(kTestServiceUrl, info)); |
| 83 apps->insert(std::make_pair(kTestServiceUrl, app_info)); | |
| 84 } | 83 } |
| 85 | 84 |
| 86 void ShellContentUtilityClient::ExposeInterfacesToBrowser( | 85 void ShellContentUtilityClient::ExposeInterfacesToBrowser( |
| 87 shell::InterfaceRegistry* registry) { | 86 shell::InterfaceRegistry* registry) { |
| 88 registry->AddInterface(base::Bind(&TestServiceImpl::Create)); | 87 registry->AddInterface(base::Bind(&TestServiceImpl::Create)); |
| 89 } | 88 } |
| 90 | 89 |
| 91 } // namespace content | 90 } // namespace content |
| OLD | NEW |