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

Unified Diff: mojo/edk/embedder/embedder.h

Issue 1685183004: Bootstrap Mojo IPC independent of Chrome IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: and fix posix Created 4 years, 10 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: mojo/edk/embedder/embedder.h
diff --git a/mojo/edk/embedder/embedder.h b/mojo/edk/embedder/embedder.h
index 6c010f416d97558fc04791274bea12c28731d80c..8e60c64ffae55e86e09ebec6cd899499cc69fd66 100644
--- a/mojo/edk/embedder/embedder.h
+++ b/mojo/edk/embedder/embedder.h
@@ -39,15 +39,33 @@ MOJO_SYSTEM_IMPL_EXPORT void SetMaxMessageSize(size_t bytes);
// SetParentPipeHandle.
MOJO_SYSTEM_IMPL_EXPORT ScopedPlatformHandle ChildProcessLaunched(
base::ProcessHandle child_process);
+
// Like above, except used when the embedder establishes the pipe between the
// parent and child processes itself.
MOJO_SYSTEM_IMPL_EXPORT void ChildProcessLaunched(
base::ProcessHandle child_process, ScopedPlatformHandle server_pipe);
+// Also like above, except used when the embedder has additionally passed an
+// out-of-band secret to the child process which must be received on this
+// |server_pipe| and validated before a working pipe can be established.
+//
+// NOTE: This should only be used to support Windows named pipes.
+MOJO_SYSTEM_IMPL_EXPORT void ChildProcessLaunched(
+ base::ProcessHandle child_process,
+ ScopedPlatformHandle server_pipe,
+ const std::string& secret);
+
// Should be called as early as possible in the child process with the handle
// that the parent received from ChildProcessLaunched.
MOJO_SYSTEM_IMPL_EXPORT void SetParentPipeHandle(ScopedPlatformHandle pipe);
+// Like above, except used when the parent has passed the child an out-of-band
+// secret which must be sent on |pipe| before a working pipe can be established.
+//
+// NOTE: This should only be used to support Windows named pipes.
+MOJO_SYSTEM_IMPL_EXPORT void SetParentPipeHandle(ScopedPlatformHandle pipe,
+ const std::string& secret);
+
// Must be called first, or just after setting configuration parameters, to
// initialize the (global, singleton) system.
MOJO_SYSTEM_IMPL_EXPORT void Init();

Powered by Google App Engine
This is Rietveld 408576698