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

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

Issue 1387963004: Create a broker interface for the new Mojo EDK so that the browser can create and duplicate messa... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: presubmit whitespace error Created 5 years, 1 month 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 2bf9e15d0622a74ec968190719a33f0930733c31..52cca506898a9c1272db47f581d40c817f863fc7 100644
--- a/mojo/edk/embedder/embedder.h
+++ b/mojo/edk/embedder/embedder.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/process/process.h"
#include "base/task_runner.h"
#include "mojo/edk/embedder/scoped_platform_handle.h"
#include "mojo/edk/system/system_impl_export.h"
@@ -29,6 +30,27 @@ class ProcessDelegate;
// Allows changing the default max message size. Must be called before Init.
MOJO_SYSTEM_IMPL_EXPORT void SetMaxMessageSize(size_t bytes);
+#if defined(OS_WIN)
+// Must be called before Init in the parent (unsandboxed) process.
+MOJO_SYSTEM_IMPL_EXPORT void PreInitializeParentProcess();
+
+// Must be called before Init in the child (sandboxed) process.
+MOJO_SYSTEM_IMPL_EXPORT void PreInitializeChildProcess();
+
+// Called in the parent process for each child process that is launched. The
+// returned handle must be sent to the child process which then calls
+// SetParentPipeHandle.
+MOJO_SYSTEM_IMPL_EXPORT HANDLE ChildProcessLaunched(HANDLE 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(HANDLE child_process,
+ HANDLE server_pipe);
+
+// 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(HANDLE pipe);
+#endif
+
// 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