| Index: mojo/runner/context.cc
|
| diff --git a/mojo/runner/context.cc b/mojo/runner/context.cc
|
| index b6d78e333d17a9def89f69a54854344420758ecb..b6cd6ca905f8d8fc6940e038213530c153ea6bc2 100644
|
| --- a/mojo/runner/context.cc
|
| +++ b/mojo/runner/context.cc
|
| @@ -27,8 +27,6 @@
|
| #include "mojo/application/public/cpp/application_impl.h"
|
| #include "mojo/common/trace_controller_impl.h"
|
| #include "mojo/common/tracing_impl.h"
|
| -#include "mojo/edk/embedder/embedder.h"
|
| -#include "mojo/edk/embedder/simple_platform_support.h"
|
| #include "mojo/package_manager/package_manager_impl.h"
|
| #include "mojo/runner/in_process_native_runner.h"
|
| #include "mojo/runner/out_of_process_native_runner.h"
|
| @@ -42,6 +40,14 @@
|
| #include "mojo/util/filename_util.h"
|
| #include "url/gurl.h"
|
|
|
| +#if defined(USE_CHROME_EDK)
|
| +#include "mojo/edk/embedder/embedder.h"
|
| +#include "mojo/edk/embedder/simple_platform_support.h"
|
| +#else
|
| +#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
|
| +#include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h"
|
| +#endif
|
| +
|
| namespace mojo {
|
| namespace runner {
|
| namespace {
|
| @@ -50,7 +56,11 @@ namespace {
|
| class Setup {
|
| public:
|
| Setup() {
|
| +#if defined(USE_CHROME_EDK)
|
| + edk::Init(make_scoped_ptr(new edk::SimplePlatformSupport()));
|
| +#else
|
| embedder::Init(make_scoped_ptr(new embedder::SimplePlatformSupport()));
|
| +#endif
|
| }
|
|
|
| ~Setup() {}
|
| @@ -185,10 +195,16 @@ bool Context::Init() {
|
| task_runners_.reset(
|
| new TaskRunners(base::MessageLoop::current()->task_runner()));
|
|
|
| +#if defined(USE_CHROME_EDK)
|
| + edk::InitIPCSupport(
|
| + task_runners_->shell_runner(), this, task_runners_->io_runner(),
|
| + edk::ScopedPlatformHandle());
|
| +#else
|
| // TODO(vtl): This should be MASTER, not NONE.
|
| embedder::InitIPCSupport(
|
| embedder::ProcessType::NONE, task_runners_->shell_runner(), this,
|
| task_runners_->io_runner(), embedder::ScopedPlatformHandle());
|
| +#endif
|
|
|
| package_manager_ = new package_manager::PackageManagerImpl(shell_file_root_);
|
| InitContentHandlers(package_manager_, command_line);
|
| @@ -244,7 +260,11 @@ void Context::Shutdown() {
|
| TRACE_EVENT0("mojo_shell", "Context::Shutdown");
|
| DCHECK_EQ(base::MessageLoop::current()->task_runner(),
|
| task_runners_->shell_runner());
|
| +#if defined(USE_CHROME_EDK)
|
| + edk::ShutdownIPCSupport();
|
| +#else
|
| embedder::ShutdownIPCSupport();
|
| +#endif
|
| // We'll quit when we get OnShutdownComplete().
|
| base::MessageLoop::current()->Run();
|
| }
|
|
|