| Index: ipc/mojo/scoped_ipc_support.cc
|
| diff --git a/ipc/mojo/scoped_ipc_support.cc b/ipc/mojo/scoped_ipc_support.cc
|
| index b1d530e0463aedfe7c4e18f13a9aa94e31142395..0d9253990a898a8a2dcbf829ea42b2cd1f407333 100644
|
| --- a/ipc/mojo/scoped_ipc_support.cc
|
| +++ b/ipc/mojo/scoped_ipc_support.cc
|
| @@ -12,14 +12,23 @@
|
| #include "base/synchronization/lock.h"
|
| #include "base/synchronization/waitable_event.h"
|
| #include "base/thread_task_runner_handle.h"
|
| +
|
| +#if defined(USE_CHROME_EDK)
|
| +#include "mojo/edk/embedder/embedder.h"
|
| +#include "mojo/edk/embedder/process_delegate.h"
|
| +#else
|
| #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
|
| #include "third_party/mojo/src/mojo/edk/embedder/process_delegate.h"
|
| +#endif
|
|
|
| namespace IPC {
|
|
|
| namespace {
|
| -
|
| +#if defined(USE_CHROME_EDK)
|
| +class IPCSupportInitializer : public mojo::edk::ProcessDelegate {
|
| +#else
|
| class IPCSupportInitializer : public mojo::embedder::ProcessDelegate {
|
| +#endif
|
| public:
|
| IPCSupportInitializer()
|
| : init_count_(0),
|
| @@ -105,9 +114,16 @@ void IPCSupportInitializer::Init(
|
| io_thread_task_runner_ = io_thread_task_runner;
|
| io_thread_task_runner_->PostTask(
|
| FROM_HERE, base::Bind(&WatchMessageLoopOnIOThread, observer_));
|
| +
|
| +#if defined(USE_CHROME_EDK)
|
| + mojo::edk::InitIPCSupport(
|
| + io_thread_task_runner_, this, io_thread_task_runner_,
|
| + mojo::edk::ScopedPlatformHandle());
|
| +#else
|
| mojo::embedder::InitIPCSupport(
|
| - mojo::embedder::ProcessType::NONE, io_thread_task_runner_, this,
|
| - io_thread_task_runner_, mojo::embedder::ScopedPlatformHandle());
|
| + mojo::embedder::ProcessType::NONE, io_thread_task_runner_, this, io_thread_task_runner_,
|
| + mojo::embedder::ScopedPlatformHandle());
|
| +#endif
|
| }
|
| }
|
|
|
| @@ -144,7 +160,11 @@ void IPCSupportInitializer::ForceShutdown() {
|
| void IPCSupportInitializer::ShutDownOnIOThread() {
|
| base::AutoLock locker(lock_);
|
| if (shutting_down_ && !was_shut_down_) {
|
| +#if defined(USE_CHROME_EDK)
|
| + mojo::edk::ShutdownIPCSupportOnIOThread();
|
| +#else
|
| mojo::embedder::ShutdownIPCSupportOnIOThread();
|
| +#endif
|
| init_count_ = 0;
|
| shutting_down_ = false;
|
| io_thread_task_runner_ = nullptr;
|
|
|