| Index: ipc/mojo/ipc_channel_mojo.h
|
| diff --git a/ipc/mojo/ipc_channel_mojo.h b/ipc/mojo/ipc_channel_mojo.h
|
| index 22c56a9e6894643e51f6f3838131dc6da513c8ce..f0b724e2afd549baf05eca6d5ace95998c52761c 100644
|
| --- a/ipc/mojo/ipc_channel_mojo.h
|
| +++ b/ipc/mojo/ipc_channel_mojo.h
|
| @@ -14,6 +14,7 @@
|
| #include "ipc/ipc_channel_factory.h"
|
| #include "ipc/ipc_export.h"
|
| #include "ipc/mojo/ipc_message_pipe_reader.h"
|
| +#include "ipc/mojo/ipc_mojo_bootstrap.h"
|
| #include "mojo/public/cpp/system/core.h"
|
|
|
| namespace mojo {
|
| @@ -55,7 +56,8 @@ class MessageReader;
|
| // TODO(morrita): Add APIs to create extra MessagePipes to let
|
| // Mojo-based objects talk over this Channel.
|
| //
|
| -class IPC_MOJO_EXPORT ChannelMojo : public Channel {
|
| +class IPC_MOJO_EXPORT ChannelMojo : public Channel,
|
| + public MojoBootstrap::Delegate {
|
| public:
|
| // Create ChannelMojo. A bootstrap channel is created as well.
|
| static scoped_ptr<ChannelMojo> Create(
|
| @@ -77,6 +79,7 @@ class IPC_MOJO_EXPORT ChannelMojo : public Channel {
|
| virtual base::ProcessId GetPeerPID() const OVERRIDE;
|
| virtual base::ProcessId GetSelfPID() const OVERRIDE;
|
| virtual ChannelHandle TakePipeHandle() OVERRIDE;
|
| + virtual void OnClientLaunched(base::ProcessHandle handle) OVERRIDE;
|
|
|
| #if defined(OS_POSIX) && !defined(OS_NACL)
|
| virtual int GetClientFileDescriptor() const OVERRIDE;
|
| @@ -92,6 +95,11 @@ class IPC_MOJO_EXPORT ChannelMojo : public Channel {
|
|
|
| #endif // defined(OS_POSIX) && !defined(OS_NACL)
|
|
|
| + // MojoBootstrapDelegate implementation
|
| + virtual void OnPipeAvailable(
|
| + mojo::embedder::ScopedPlatformHandle handle) OVERRIDE;
|
| + virtual void OnBootstrapError() OVERRIDE;
|
| +
|
| // Called from MessagePipeReader implementations
|
| void OnMessageReceived(Message& message);
|
| void OnConnected(mojo::ScopedMessagePipeHandle pipe);
|
| @@ -115,9 +123,10 @@ class IPC_MOJO_EXPORT ChannelMojo : public Channel {
|
| // notifications invoked by them.
|
| typedef internal::MessagePipeReader::DelayedDeleter ReaderDeleter;
|
|
|
| - void InitOnIOThread();
|
| + void InitBootstrap(ChannelHandle handle);
|
| + void InitControlReader(mojo::embedder::ScopedPlatformHandle handle);
|
|
|
| - scoped_ptr<Channel> bootstrap_;
|
| + scoped_ptr<MojoBootstrap> bootstrap_;
|
| Mode mode_;
|
| Listener* listener_;
|
| base::ProcessId peer_pid_;
|
|
|