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

Unified Diff: mojo/runner/child_process_host.h

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move to mojo::edk namespace in preparation for runtim flag Created 5 years, 3 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/runner/child_process_host.h
diff --git a/mojo/runner/child_process_host.h b/mojo/runner/child_process_host.h
index 8ab3147992b82e3faab43bde95d7ebf0b0e68b5c..47ab6dd7fe204f337746adef7f277ace518ea02b 100644
--- a/mojo/runner/child_process_host.h
+++ b/mojo/runner/child_process_host.h
@@ -8,12 +8,18 @@
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/process/process.h"
-#include "mojo/edk/embedder/channel_info_forward.h"
-#include "mojo/edk/embedder/platform_channel_pair.h"
-#include "mojo/edk/embedder/scoped_platform_handle.h"
#include "mojo/runner/child_process.mojom.h"
#include "mojo/runner/child_process_host.h"
+#if defined(USE_CHROME_EDK)
+#include "mojo/edk/embedder/platform_channel_pair.h"
+#include "mojo/edk/embedder/scoped_platform_handle.h"
+#else
+#include "third_party/mojo/src/mojo/edk/embedder/channel_info_forward.h"
+#include "third_party/mojo/src/mojo/edk/embedder/platform_channel_pair.h"
+#include "third_party/mojo/src/mojo/edk/embedder/scoped_platform_handle.h"
+#endif
+
namespace mojo {
namespace runner {
@@ -65,21 +71,29 @@ class ChildProcessHost {
void AppCompleted(int32_t result);
+#if !defined(USE_CHROME_EDK)
// Callback for |embedder::CreateChannel()|.
void DidCreateChannel(embedder::ChannelInfo* channel_info);
+#endif
Context* const context_;
bool start_sandboxed_;
const base::FilePath app_path_;
base::Process child_process_;
- embedder::PlatformChannelPair platform_channel_pair_;
ChildControllerPtr controller_;
+#if defined(USE_CHROME_EDK)
+ edk::PlatformChannelPair platform_channel_pair_;
+ // Platform-specific "pipe" to the child process. Valid immediately after
+ // creation.
+ edk::ScopedPlatformHandle platform_channel_;
+#else
+ embedder::PlatformChannelPair platform_channel_pair_;
embedder::ChannelInfo* channel_info_;
- ChildController::StartAppCallback on_app_complete_;
-
// Platform-specific "pipe" to the child process. Valid immediately after
// creation.
embedder::ScopedPlatformHandle platform_channel_;
+#endif
+ ChildController::StartAppCallback on_app_complete_;
DISALLOW_COPY_AND_ASSIGN(ChildProcessHost);
};

Powered by Google App Engine
This is Rietveld 408576698