| 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..e051c92e363175a7b8a49987b2652460cf362860 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();
|
| @@ -128,15 +133,20 @@ class IPC_MOJO_EXPORT ChannelMojo
|
| Mode mode,
|
| Listener* listener,
|
| AttachmentBroker* broker);
|
| -
|
| +#if defined(USE_CHROME_EDK)
|
| + void CreateMessagingPipe(mojo::edk::ScopedPlatformHandle handle,
|
| + const CreateMessagingPipeCallback& callback);
|
| +#else
|
| void CreateMessagingPipe(mojo::embedder::ScopedPlatformHandle handle,
|
| const CreateMessagingPipeCallback& callback);
|
| +#endif
|
| void InitMessageReader(mojo::ScopedMessagePipeHandle pipe, int32_t peer_pid);
|
|
|
| Listener* listener() const { return listener_; }
|
| 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 +155,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 +164,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 +172,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_|
|
| //
|
|
|