| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "mojo/runner/context.h" | 5 #include "mojo/runner/context.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 task_runners_->io_runner(), | 217 task_runners_->io_runner(), |
| 218 embedder::ScopedPlatformHandle()); | 218 embedder::ScopedPlatformHandle()); |
| 219 | 219 |
| 220 package_manager_ = new shell::PackageManagerImpl( | 220 package_manager_ = new shell::PackageManagerImpl( |
| 221 shell_file_root, task_runners_->blocking_pool()); | 221 shell_file_root, task_runners_->blocking_pool()); |
| 222 InitContentHandlers(package_manager_, command_line); | 222 InitContentHandlers(package_manager_, command_line); |
| 223 | 223 |
| 224 RegisterLocalAliases(package_manager_); | 224 RegisterLocalAliases(package_manager_); |
| 225 | 225 |
| 226 scoped_ptr<shell::NativeRunnerFactory> runner_factory; | 226 scoped_ptr<shell::NativeRunnerFactory> runner_factory; |
| 227 if (command_line.HasSwitch(switches::kEnableMultiprocess)) { | 227 if (command_line.HasSwitch(switches::kMojoSingleProcess)) { |
| 228 runner_factory.reset( | |
| 229 new OutOfProcessNativeRunnerFactory(task_runners_->blocking_pool())); | |
| 230 } else { | |
| 231 #if defined(COMPONENT_BUILD) | 228 #if defined(COMPONENT_BUILD) |
| 232 LOG(ERROR) << "Running Mojo in single process component build, which isn't " | 229 LOG(ERROR) << "Running Mojo in single process component build, which isn't " |
| 233 << "supported because statics in apps interact. Use static build" | 230 << "supported because statics in apps interact. Use static build" |
| 234 << " or don't pass --single-process."; | 231 << " or don't pass --single-process."; |
| 235 #endif | 232 #endif |
| 236 runner_factory.reset( | 233 runner_factory.reset( |
| 237 new InProcessNativeRunnerFactory(task_runners_->blocking_pool())); | 234 new InProcessNativeRunnerFactory(task_runners_->blocking_pool())); |
| 235 } else { |
| 236 runner_factory.reset( |
| 237 new OutOfProcessNativeRunnerFactory(task_runners_->blocking_pool())); |
| 238 } | 238 } |
| 239 application_manager_.reset(new shell::ApplicationManager( | 239 application_manager_.reset(new shell::ApplicationManager( |
| 240 make_scoped_ptr(package_manager_), std::move(runner_factory), | 240 make_scoped_ptr(package_manager_), std::move(runner_factory), |
| 241 task_runners_->blocking_pool())); | 241 task_runners_->blocking_pool())); |
| 242 | 242 |
| 243 ServiceProviderPtr tracing_services; | 243 ServiceProviderPtr tracing_services; |
| 244 ServiceProviderPtr tracing_exposed_services; | 244 ServiceProviderPtr tracing_exposed_services; |
| 245 new TracingServiceProvider(&tracer_, GetProxy(&tracing_exposed_services)); | 245 new TracingServiceProvider(&tracer_, GetProxy(&tracing_exposed_services)); |
| 246 | 246 |
| 247 scoped_ptr<shell::ConnectToApplicationParams> params( | 247 scoped_ptr<shell::ConnectToApplicationParams> params( |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 base::MessageLoop::current()->QuitWhenIdle(); | 347 base::MessageLoop::current()->QuitWhenIdle(); |
| 348 } else { | 348 } else { |
| 349 app_complete_callback_.Run(); | 349 app_complete_callback_.Run(); |
| 350 } | 350 } |
| 351 } | 351 } |
| 352 } | 352 } |
| 353 } | 353 } |
| 354 | 354 |
| 355 } // namespace runner | 355 } // namespace runner |
| 356 } // namespace mojo | 356 } // namespace mojo |
| OLD | NEW |