Index: ipc/ipc_channel_mojo.h |
diff --git a/ipc/ipc_channel_mojo.h b/ipc/ipc_channel_mojo.h |
index 774a82a2627ddaadb86bfee0413f954fa358006f..c267649dd849530f4f648982f3e4f5db90dd3019 100644 |
--- a/ipc/ipc_channel_mojo.h |
+++ b/ipc/ipc_channel_mojo.h |
@@ -7,7 +7,9 @@ |
#include <stdint.h> |
+#include <map> |
#include <memory> |
+#include <string> |
#include <vector> |
#include "base/macros.h" |
@@ -37,6 +39,7 @@ namespace IPC { |
// |
class IPC_EXPORT ChannelMojo |
: public Channel, |
+ public Channel::AssociatedInterfaceSupport, |
public MojoBootstrap::Delegate, |
public NON_EXPORTED_BASE(internal::MessagePipeReader::Delegate) { |
public: |
@@ -62,6 +65,7 @@ class IPC_EXPORT ChannelMojo |
bool IsSendThreadSafe() const override; |
base::ProcessId GetPeerPID() const override; |
base::ProcessId GetSelfPID() const override; |
+ Channel::AssociatedInterfaceSupport* GetAssociatedInterfaceSupport() override; |
#if defined(OS_POSIX) && !defined(OS_NACL_SFI) |
int GetClientFileDescriptor() const override; |
@@ -82,6 +86,9 @@ class IPC_EXPORT ChannelMojo |
mojom::ChannelAssociatedRequest receive_channel, |
int32_t peer_pid) override; |
void OnBootstrapError() override; |
+ void OnAssociatedInterfaceRequest( |
+ const std::string& name, |
+ mojo::ScopedInterfaceEndpointHandle handle) override; |
// MessagePipeReader::Delegate |
void OnMessageReceived(const Message& message) override; |
@@ -96,6 +103,15 @@ class IPC_EXPORT ChannelMojo |
mojom::ChannelAssociatedRequest receiver, |
base::ProcessId peer_pid); |
+ // Channel::AssociatedInterfaceSupport: |
+ mojo::AssociatedGroup* GetAssociatedGroup() override; |
+ void AddGenericAssociatedInterface( |
+ const std::string& name, |
+ const GenericAssociatedInterfaceFactory& factory) override; |
+ void GetGenericRemoteAssociatedInterface( |
+ const std::string& name, |
+ mojo::ScopedInterfaceEndpointHandle handle) override; |
+ |
// ChannelMojo needs to kill its MessagePipeReader in delayed manner |
// because the channel wants to kill these readers during the |
// notifications invoked by them. |
@@ -108,6 +124,9 @@ class IPC_EXPORT ChannelMojo |
std::unique_ptr<MojoBootstrap> bootstrap_; |
Listener* listener_; |
+ 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_; |