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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 private: | 47 private: |
48 explicit TestMojoServiceImpl( | 48 explicit TestMojoServiceImpl( |
49 mojo::InterfaceRequest<mojom::TestMojoService> request) | 49 mojo::InterfaceRequest<mojom::TestMojoService> request) |
50 : binding_(this, std::move(request)) {} | 50 : binding_(this, std::move(request)) {} |
51 | 51 |
52 mojo::StrongBinding<mojom::TestMojoService> binding_; | 52 mojo::StrongBinding<mojom::TestMojoService> binding_; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(TestMojoServiceImpl); | 54 DISALLOW_COPY_AND_ASSIGN(TestMojoServiceImpl); |
55 }; | 55 }; |
56 | 56 |
57 std::unique_ptr<shell::ShellClient> CreateTestApp( | 57 std::unique_ptr<shell::Service> CreateTestApp( |
58 const base::Closure& quit_closure) { | 58 const base::Closure& quit_closure) { |
59 return std::unique_ptr<shell::ShellClient>(new TestMojoApp); | 59 return std::unique_ptr<shell::Service>(new TestMojoApp); |
60 } | 60 } |
61 | 61 |
62 } // namespace | 62 } // namespace |
63 | 63 |
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::ExposeInterfacesToBrowser( | 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 |