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

Unified Diff: content/common/mojo/channel_init.h

Issue 1585493002: [mojo] Ports EDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: content/common/mojo/channel_init.h
diff --git a/content/common/mojo/channel_init.h b/content/common/mojo/channel_init.h
index acdc5752c95f656043198e70aa3556e9c109cd96..4c1905329b98eb623dee680e91dde99de790848d 100644
--- a/content/common/mojo/channel_init.h
+++ b/content/common/mojo/channel_init.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_COMMON_MOJO_CHANNEL_INIT_H_
#define CONTENT_COMMON_MOJO_CHANNEL_INIT_H_
+#include "base/callback.h"
#include "base/files/file.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -27,11 +28,12 @@ class CONTENT_EXPORT ChannelInit {
ChannelInit();
~ChannelInit();
- // Initializes the channel. This takes ownership of |file|. Returns the
- // primordial MessagePipe for the channel.
- mojo::ScopedMessagePipeHandle Init(
+ // Initializes the channel. This takes ownership of |file|. Calls |callback|
+ // on the calling thread once the pipe is created.
+ void Init(
base::PlatformFile file,
- scoped_refptr<base::TaskRunner> io_thread_task_runner);
+ scoped_refptr<base::TaskRunner> io_thread_task_runner,
+ const base::Callback<void(mojo::ScopedMessagePipeHandle)>& callback);
// Notifies the channel that we (hence it) will soon be destroyed.
void WillDestroySoon();
@@ -45,6 +47,12 @@ class CONTENT_EXPORT ChannelInit {
scoped_ptr<IPC::ScopedIPCSupport> ipc_support,
mojo::embedder::ChannelInfo* channel);
+ // Callback used with the new ports EDK on pipe creation.
+ void OnCreateMessagePipe(
+ scoped_ptr<IPC::ScopedIPCSupport> ipc_support,
+ const base::Callback<void(mojo::ScopedMessagePipeHandle)>& callback,
+ mojo::ScopedMessagePipeHandle pipe);
+
// If non-null the channel has been established.
mojo::embedder::ChannelInfo* channel_info_;

Powered by Google App Engine
This is Rietveld 408576698