| Index: ipc/mojo/ipc_channel_mojo.h
|
| diff --git a/ipc/mojo/ipc_channel_mojo.h b/ipc/mojo/ipc_channel_mojo.h
|
| index e7b7b767a68a5a82d20fea25ad0a92121b3dffe5..b6fb3ed2afb131bc19488cb56b12e5d10d3523fa 100644
|
| --- a/ipc/mojo/ipc_channel_mojo.h
|
| +++ b/ipc/mojo/ipc_channel_mojo.h
|
| @@ -17,9 +17,12 @@
|
| #include "ipc/mojo/ipc_message_pipe_reader.h"
|
| #include "ipc/mojo/ipc_mojo_bootstrap.h"
|
| #include "ipc/mojo/scoped_ipc_support.h"
|
| -#include "third_party/mojo/src/mojo/edk/embedder/channel_info_forward.h"
|
| #include "third_party/mojo/src/mojo/public/cpp/system/core.h"
|
|
|
| +#if !defined(USE_CHROME_EDK)
|
| +#include "third_party/mojo/src/mojo/edk/embedder/channel_info_forward.h"
|
| +#endif
|
| +
|
| namespace IPC {
|
|
|
| // Mojo-based IPC::Channel implementation over a platform handle.
|
| @@ -53,9 +56,11 @@ class IPC_MOJO_EXPORT ChannelMojo
|
| public:
|
| using CreateMessagingPipeCallback =
|
| base::Callback<void(mojo::ScopedMessagePipeHandle)>;
|
| +#if !defined(USE_CHROME_EDK)
|
| using CreateMessagingPipeOnIOThreadCallback =
|
| base::Callback<void(mojo::ScopedMessagePipeHandle,
|
| mojo::embedder::ChannelInfo*)>;
|
| +#endif
|
|
|
| // True if ChannelMojo should be used regardless of the flag.
|
| static bool ShouldBeUsed();
|
| @@ -137,6 +142,7 @@ class IPC_MOJO_EXPORT ChannelMojo
|
| void set_peer_pid(base::ProcessId pid) { peer_pid_ = pid; }
|
|
|
| private:
|
| +#if !defined(USE_CHROME_EDK)
|
| struct ChannelInfoDeleter {
|
| explicit ChannelInfoDeleter(scoped_refptr<base::TaskRunner> io_runner);
|
| ~ChannelInfoDeleter();
|
| @@ -145,6 +151,7 @@ class IPC_MOJO_EXPORT ChannelMojo
|
|
|
| scoped_refptr<base::TaskRunner> io_runner;
|
| };
|
| +#endif
|
|
|
| // ChannelMojo needs to kill its MessagePipeReader in delayed manner
|
| // because the channel wants to kill these readers during the
|
| @@ -153,6 +160,7 @@ class IPC_MOJO_EXPORT ChannelMojo
|
|
|
| void InitOnIOThread();
|
|
|
| +#if !defined(USE_CHROME_EDK)
|
| static void CreateMessagingPipeOnIOThread(
|
| mojo::embedder::ScopedPlatformHandle handle,
|
| scoped_refptr<base::TaskRunner> callback_runner,
|
| @@ -160,13 +168,16 @@ class IPC_MOJO_EXPORT ChannelMojo
|
| void OnMessagingPipeCreated(const CreateMessagingPipeCallback& callback,
|
| mojo::ScopedMessagePipeHandle handle,
|
| mojo::embedder::ChannelInfo* channel_info);
|
| +#endif
|
|
|
| scoped_ptr<MojoBootstrap> bootstrap_;
|
| Listener* listener_;
|
| base::ProcessId peer_pid_;
|
| scoped_refptr<base::TaskRunner> io_runner_;
|
| +#if !defined(USE_CHROME_EDK)
|
| scoped_ptr<mojo::embedder::ChannelInfo,
|
| ChannelInfoDeleter> channel_info_;
|
| +#endif
|
|
|
| // Guards |message_reader_|, |waiting_connect_| and |pending_messages_|
|
| //
|
|
|