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

Unified Diff: ipc/mojo/ipc_channel_mojo.h

Issue 1185133006: IPC: Make ChannelReader inherit from SupportsAttachmentBrokering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from tsepez. Created 5 years, 6 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
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | ipc/mojo/ipc_channel_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/ipc_channel_mojo.h
diff --git a/ipc/mojo/ipc_channel_mojo.h b/ipc/mojo/ipc_channel_mojo.h
index 3a1d98a8a97445cb9c72c7455c18a6ce2c20386a..b84a6e39a61862c6c77c64f7f20362a0992d1d57 100644
--- a/ipc/mojo/ipc_channel_mojo.h
+++ b/ipc/mojo/ipc_channel_mojo.h
@@ -69,25 +69,37 @@ class IPC_MOJO_EXPORT ChannelMojo
// Create ChannelMojo. A bootstrap channel is created as well.
// |host| must not be null for server channels.
+ // |broker| must outlive the newly created channel.
static scoped_ptr<ChannelMojo> Create(
Delegate* delegate,
scoped_refptr<base::TaskRunner> io_runner,
const ChannelHandle& channel_handle,
Mode mode,
- Listener* listener);
+ Listener* listener,
+ AttachmentBroker* broker);
// Create a factory object for ChannelMojo.
// The factory is used to create Mojo-based ChannelProxy family.
// |host| must not be null.
+ // TODO(erikchen): Remove default parameter for |broker|. It exists only to
+ // make the upcoming refactor decomposable into smaller CLs.
+ // http://crbug.com/493414.
+ // |broker| must outlive the factory and all channels it creates.
static scoped_ptr<ChannelFactory> CreateServerFactory(
Delegate* delegate,
scoped_refptr<base::TaskRunner> io_runner,
- const ChannelHandle& channel_handle);
+ const ChannelHandle& channel_handle,
+ AttachmentBroker* broker = nullptr);
+ // TODO(erikchen): Remove default parameter for |broker|. It exists only to
+ // make the upcoming refactor decomposable into smaller CLs.
+ // http://crbug.com/493414.
+ // |broker| must outlive the factory and all channels it creates.
static scoped_ptr<ChannelFactory> CreateClientFactory(
Delegate* delegate,
scoped_refptr<base::TaskRunner> io_runner,
- const ChannelHandle& channel_handle);
+ const ChannelHandle& channel_handle,
+ AttachmentBroker* broker = nullptr);
~ChannelMojo() override;
@@ -129,7 +141,8 @@ class IPC_MOJO_EXPORT ChannelMojo
scoped_refptr<base::TaskRunner> io_runner,
const ChannelHandle& channel_handle,
Mode mode,
- Listener* listener);
+ Listener* listener,
+ AttachmentBroker* broker);
void CreateMessagingPipe(mojo::embedder::ScopedPlatformHandle handle,
const CreateMessagingPipeCallback& callback);
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | ipc/mojo/ipc_channel_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698