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

Unified Diff: mojo/runner/host/child_process_host.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/runner/host/child_process_host.h
diff --git a/mojo/runner/host/child_process_host.h b/mojo/runner/host/child_process_host.h
index a4d15103029413c303f3524e7442fe6bc04eb1bf..65ca9c40c6d27e69eccad74afecdeb103c0d8f79 100644
--- a/mojo/runner/host/child_process_host.h
+++ b/mojo/runner/host/child_process_host.h
@@ -10,6 +10,8 @@
#include "base/memory/weak_ptr.h"
#include "base/process/process.h"
#include "base/synchronization/waitable_event.h"
+#include "mojo/edk/embedder/platform_channel_pair.h"
+#include "mojo/public/cpp/system/message_pipe.h"
#include "mojo/runner/child/child_controller.mojom.h"
#include "mojo/runner/host/child_process_host.h"
#include "third_party/mojo/src/mojo/edk/embedder/channel_info_forward.h"
@@ -70,22 +72,29 @@ class ChildProcessHost {
// Callback for |embedder::CreateChannel()|.
void DidCreateChannel(embedder::ChannelInfo* channel_info);
- base::TaskRunner* const launch_process_runner_;
+ scoped_refptr<base::TaskRunner> launch_process_runner_;
bool start_sandboxed_;
const base::FilePath app_path_;
base::Process child_process_;
+ // Used for the ChildController binding.
embedder::PlatformChannelPair platform_channel_pair_;
ChildControllerPtr controller_;
embedder::ChannelInfo* channel_info_;
ChildController::StartAppCallback on_app_complete_;
+ embedder::HandlePassingInformation handle_passing_info_;
+
+#if defined(OS_WIN)
+ // Used only when --use-new-edk is specified, as a communication channel for
+ // TokenSerializer.
+ scoped_ptr<edk::PlatformChannelPair> serializer_platform_channel_pair_;
+#endif
// Since Start() calls a method on another thread, we use an event to block
// the main thread if it tries to destruct |this| while launching the process.
base::WaitableEvent start_child_process_event_;
- // Platform-specific "pipe" to the child process. Valid immediately after
- // creation.
- embedder::ScopedPlatformHandle platform_channel_;
+ // A message pipe to the child process. Valid immediately after creation.
+ mojo::ScopedMessagePipeHandle child_message_pipe_;
base::WeakPtrFactory<ChildProcessHost> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698