| 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 <unordered_map> | 7 #include <unordered_map> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 // static | 227 // static |
| 228 base::LazyInstance<std::unique_ptr<MojoShellContext::Proxy>> | 228 base::LazyInstance<std::unique_ptr<MojoShellContext::Proxy>> |
| 229 MojoShellContext::proxy_ = LAZY_INSTANCE_INITIALIZER; | 229 MojoShellContext::proxy_ = LAZY_INSTANCE_INITIALIZER; |
| 230 | 230 |
| 231 MojoShellContext::MojoShellContext() { | 231 MojoShellContext::MojoShellContext() { |
| 232 proxy_.Get().reset(new Proxy(this)); | 232 proxy_.Get().reset(new Proxy(this)); |
| 233 | 233 |
| 234 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = | 234 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = |
| 235 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE); | 235 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); |
| 236 std::unique_ptr<shell::NativeRunnerFactory> native_runner_factory( | 236 std::unique_ptr<shell::NativeRunnerFactory> native_runner_factory( |
| 237 new shell::InProcessNativeRunnerFactory( | 237 new shell::InProcessNativeRunnerFactory( |
| 238 BrowserThread::GetBlockingPool())); | 238 BrowserThread::GetBlockingPool())); |
| 239 | 239 |
| 240 // Allow the embedder to register additional Mojo application manifests | 240 // Allow the embedder to register additional Mojo application manifests |
| 241 // beyond the default ones below. | 241 // beyond the default ones below. |
| 242 std::unique_ptr<ContentBrowserClient::MojoApplicationManifestMap> manifests( | 242 std::unique_ptr<ContentBrowserClient::MojoApplicationManifestMap> manifests( |
| 243 new ContentBrowserClient::MojoApplicationManifestMap); | 243 new ContentBrowserClient::MojoApplicationManifestMap); |
| 244 GetContentClient()->browser()->RegisterMojoApplicationManifests( | 244 GetContentClient()->browser()->RegisterMojoApplicationManifests( |
| 245 manifests.get()); | 245 manifests.get()); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 shell::Identity source_id(requestor_name, user_id); | 355 shell::Identity source_id(requestor_name, user_id); |
| 356 params->set_source(source_id); | 356 params->set_source(source_id); |
| 357 params->set_target(shell::Identity(name, user_id)); | 357 params->set_target(shell::Identity(name, user_id)); |
| 358 params->set_remote_interfaces(std::move(request)); | 358 params->set_remote_interfaces(std::move(request)); |
| 359 params->set_local_interfaces(std::move(exposed_services)); | 359 params->set_local_interfaces(std::move(exposed_services)); |
| 360 params->set_connect_callback(callback); | 360 params->set_connect_callback(callback); |
| 361 service_manager_->Connect(std::move(params)); | 361 service_manager_->Connect(std::move(params)); |
| 362 } | 362 } |
| 363 | 363 |
| 364 } // namespace content | 364 } // namespace content |
| OLD | NEW |