summaryrefslogtreecommitdiff
path: root/chromium/content/browser/child_process_launcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/child_process_launcher.h')
-rw-r--r--chromium/content/browser/child_process_launcher.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/chromium/content/browser/child_process_launcher.h b/chromium/content/browser/child_process_launcher.h
index d5efc1e4dd6..6f51a90a6d6 100644
--- a/chromium/content/browser/child_process_launcher.h
+++ b/chromium/content/browser/child_process_launcher.h
@@ -16,7 +16,8 @@
#include "content/common/content_export.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/sandboxed_process_launcher_delegate.h"
-#include "mojo/edk/embedder/platform_channel_pair.h"
+#include "mojo/edk/embedder/embedder.h"
+#include "mojo/edk/embedder/scoped_platform_handle.h"
#if defined(OS_WIN)
#include "sandbox/win/src/sandbox_types.h"
@@ -69,11 +70,17 @@ class CONTENT_EXPORT ChildProcessLauncher : public base::NonThreadSafe {
// the callback won't be called. If the process is still running by the time
// this object destructs, it will be terminated.
// Takes ownership of cmd_line.
+ //
+ // If |process_error_callback| is provided, it will be called if a Mojo error
+ // is encountered when processing messages from the child process. This
+ // callback must be safe to call from any thread.
ChildProcessLauncher(
SandboxedProcessLauncherDelegate* delegate,
base::CommandLine* cmd_line,
int child_process_id,
Client* client,
+ const std::string& mojo_child_token,
+ const mojo::edk::ProcessErrorCallback& process_error_callback,
bool terminate_on_shutdown = true);
~ChildProcessLauncher();
@@ -151,12 +158,15 @@ class CONTENT_EXPORT ChildProcessLauncher : public base::NonThreadSafe {
int exit_code_;
ZygoteHandle zygote_;
bool starting_;
+ const mojo::edk::ProcessErrorCallback process_error_callback_;
+
// Controls whether the child process should be terminated on browser
// shutdown. Default behavior is to terminate the child.
const bool terminate_child_on_shutdown_;
- // Platform channel used to establish Mojo IPC.
- mojo::edk::PlatformChannelPair mojo_platform_channel_;
+ // Host side platform handle to establish Mojo IPC.
+ mojo::edk::ScopedPlatformHandle mojo_host_platform_handle_;
+ const std::string mojo_child_token_;
base::WeakPtrFactory<ChildProcessLauncher> weak_factory_;