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

Unified Diff: content/app/mojo/mojo_init.cc

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: content/app/mojo/mojo_init.cc
diff --git a/content/app/mojo/mojo_init.cc b/content/app/mojo/mojo_init.cc
index 8a402bc451a67cbb14303ebdb6fca8ecd73ddcf4..2b520b7889b98b488c7140dd6d2353d802d3152f 100644
--- a/content/app/mojo/mojo_init.cc
+++ b/content/app/mojo/mojo_init.cc
@@ -4,8 +4,10 @@
#include "content/app/mojo/mojo_init.h"
+#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
+#include "content/public/common/content_switches.h"
#include "ipc/ipc_channel.h"
#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
@@ -16,6 +18,20 @@ namespace {
class MojoInitializer {
public:
MojoInitializer() {
+#if defined(OS_WIN)
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch("use-new-edk")) {
+ std::string process_type =
+ command_line.GetSwitchValueASCII(switches::kProcessType);
+ if (process_type.empty()) {
+ mojo::embedder::PreInitializeParentProcess();
+ } else {
+ mojo::embedder::PreInitializeChildProcess();
+ }
+ }
+#endif
+
mojo::embedder::SetMaxMessageSize(IPC::Channel::kMaximumMessageSize);
mojo::embedder::Init();
}
« no previous file with comments | « no previous file | content/browser/browser_child_process_host_impl.cc » ('j') | mojo/edk/system/token_serializer_messages_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698