Index: ipc/ipc_channel_mojo.h |
diff --git a/ipc/ipc_channel_mojo.h b/ipc/ipc_channel_mojo.h |
index 940dcf0bbb085a3f32f39a9931366c82a925c6e7..cfadb50adc27bb1ac920cd8f3b47319b1cc2d888 100644 |
--- a/ipc/ipc_channel_mojo.h |
+++ b/ipc/ipc_channel_mojo.h |
@@ -42,7 +42,7 @@ namespace IPC { |
class IPC_EXPORT ChannelMojo |
: public Channel, |
public Channel::AssociatedInterfaceSupport, |
- public MojoBootstrap::Delegate, |
+ public NON_EXPORTED_BASE(MojoBootstrap::Delegate), |
public NON_EXPORTED_BASE(internal::MessagePipeReader::Delegate) { |
public: |
// Creates a ChannelMojo. |
@@ -90,17 +90,16 @@ class IPC_EXPORT ChannelMojo |
mojo::Array<mojom::SerializedHandlePtr>* handles); |
// MojoBootstrapDelegate implementation |
- void OnPipesAvailable(mojom::ChannelAssociatedPtrInfo send_channel, |
- mojom::ChannelAssociatedRequest receive_channel, |
- int32_t peer_pid) override; |
- void OnBootstrapError() override; |
- void OnAssociatedInterfaceRequest( |
- const std::string& name, |
- mojo::ScopedInterfaceEndpointHandle handle) override; |
+ void OnPipesAvailable(mojom::ChannelAssociatedPtr sender, |
+ mojom::ChannelAssociatedRequest receiver) override; |
// MessagePipeReader::Delegate |
+ void OnPeerPidReceived() override; |
void OnMessageReceived(const Message& message) override; |
void OnPipeError() override; |
+ void OnAssociatedInterfaceRequest( |
+ const std::string& name, |
+ mojo::ScopedInterfaceEndpointHandle handle) override; |
private: |
ChannelMojo( |
@@ -109,10 +108,6 @@ class IPC_EXPORT ChannelMojo |
Listener* listener, |
const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner); |
- void InitMessageReader(mojom::ChannelAssociatedPtrInfo sender, |
- mojom::ChannelAssociatedRequest receiver, |
- base::ProcessId peer_pid); |
- |
// Channel::AssociatedInterfaceSupport: |
mojo::AssociatedGroup* GetAssociatedGroup() override; |
void AddGenericAssociatedInterface( |
@@ -121,13 +116,6 @@ class IPC_EXPORT ChannelMojo |
void GetGenericRemoteAssociatedInterface( |
const std::string& name, |
mojo::ScopedInterfaceEndpointHandle handle) override; |
- void SetProxyTaskRunner( |
- scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; |
- |
- // ChannelMojo needs to kill its MessagePipeReader in delayed manner |
- // because the channel wants to kill these readers during the |
- // notifications invoked by them. |
- typedef internal::MessagePipeReader::DelayedDeleter ReaderDeleter; |
// A TaskRunner which runs tasks on the ChannelMojo's owning thread. |
scoped_refptr<base::TaskRunner> task_runner_; |
@@ -136,15 +124,12 @@ class IPC_EXPORT ChannelMojo |
std::unique_ptr<MojoBootstrap> bootstrap_; |
Listener* listener_; |
+ std::unique_ptr<internal::MessagePipeReader> message_reader_; |
+ |
+ base::Lock associated_interface_lock_; |
std::map<std::string, GenericAssociatedInterfaceFactory> |
associated_interfaces_; |
- // Guards access to the fields below. |
- mutable base::Lock lock_; |
- std::unique_ptr<internal::MessagePipeReader, ReaderDeleter> message_reader_; |
- std::vector<std::unique_ptr<Message>> pending_messages_; |
- bool waiting_connect_; |
- |
base::WeakPtrFactory<ChannelMojo> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(ChannelMojo); |