Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Unified Diff: ipc/ipc_channel_mojo.h

Issue 2163633003: Support early associated interface binding on ChannelMojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicit-channel-ipc-task-runner
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ipc/ipc_channel_mojo.h
diff --git a/ipc/ipc_channel_mojo.h b/ipc/ipc_channel_mojo.h
index 940dcf0bbb085a3f32f39a9931366c82a925c6e7..d10233f6c30b30f5acab9f2fa1db5f2ad35e3ffa 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,8 +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
@@ -136,14 +129,13 @@ class IPC_EXPORT ChannelMojo
std::unique_ptr<MojoBootstrap> bootstrap_;
Listener* listener_;
+ 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_;
« no previous file with comments | « ipc/ipc_channel.h ('k') | ipc/ipc_channel_mojo.cc » ('j') | ipc/ipc_channel_mojo.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698