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/browser/mojo/mojo_shell_context.h" | 5 #include "content/browser/mojo/mojo_shell_context.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 const StaticApplicationMap* apps) { | 153 const StaticApplicationMap* apps) { |
154 g_applications_for_test = apps; | 154 g_applications_for_test = apps; |
155 } | 155 } |
156 | 156 |
157 MojoShellContext::MojoShellContext() { | 157 MojoShellContext::MojoShellContext() { |
158 proxy_.Get().reset(new Proxy(this)); | 158 proxy_.Get().reset(new Proxy(this)); |
159 | 159 |
160 // Construct with an empty filepath since mojo: urls can't be registered now | 160 // Construct with an empty filepath since mojo: urls can't be registered now |
161 // the url scheme registry is locked. | 161 // the url scheme registry is locked. |
162 scoped_ptr<mojo::package_manager::PackageManagerImpl> package_manager( | 162 scoped_ptr<mojo::package_manager::PackageManagerImpl> package_manager( |
163 new mojo::package_manager::PackageManagerImpl(base::FilePath())); | 163 new mojo::package_manager::PackageManagerImpl(base::FilePath(), nullptr)); |
164 application_manager_.reset( | 164 application_manager_.reset( |
165 new mojo::shell::ApplicationManager(package_manager.Pass())); | 165 new mojo::shell::ApplicationManager(package_manager.Pass())); |
166 | 166 |
167 application_manager_->set_default_loader( | 167 application_manager_->set_default_loader( |
168 scoped_ptr<mojo::shell::ApplicationLoader>(new DefaultApplicationLoader)); | 168 scoped_ptr<mojo::shell::ApplicationLoader>(new DefaultApplicationLoader)); |
169 | 169 |
170 StaticApplicationMap apps; | 170 StaticApplicationMap apps; |
171 GetContentClient()->browser()->RegisterInProcessMojoApplications(&apps); | 171 GetContentClient()->browser()->RegisterInProcessMojoApplications(&apps); |
172 if (g_applications_for_test) { | 172 if (g_applications_for_test) { |
173 // Add testing apps to the map, potentially overwriting whatever the | 173 // Add testing apps to the map, potentially overwriting whatever the |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 mojo::shell::GetPermissiveCapabilityFilter())); | 242 mojo::shell::GetPermissiveCapabilityFilter())); |
243 params->SetTarget(mojo::shell::Identity(url, std::string(), filter)); | 243 params->SetTarget(mojo::shell::Identity(url, std::string(), filter)); |
244 params->set_services(request.Pass()); | 244 params->set_services(request.Pass()); |
245 params->set_exposed_services(exposed_services.Pass()); | 245 params->set_exposed_services(exposed_services.Pass()); |
246 params->set_on_application_end(base::Bind(&base::DoNothing)); | 246 params->set_on_application_end(base::Bind(&base::DoNothing)); |
247 params->set_connect_callback(callback); | 247 params->set_connect_callback(callback); |
248 application_manager_->ConnectToApplication(params.Pass()); | 248 application_manager_->ConnectToApplication(params.Pass()); |
249 } | 249 } |
250 | 250 |
251 } // namespace content | 251 } // namespace content |
OLD | NEW |