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

Unified Diff: mojo/shell/child_process.cc

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 9 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
« no previous file with comments | « mojo/shell/child_process.h ('k') | mojo/shell/child_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/child_process.cc
diff --git a/mojo/shell/child_process.cc b/mojo/shell/child_process.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1140c14fb63550dde4d85049dc74a0b5dcf16706
--- /dev/null
+++ b/mojo/shell/child_process.cc
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/shell/child_process.h"
+
+#include "base/command_line.h"
+#include "base/logging.h"
+#include "mojo/edk/embedder/platform_channel_pair.h"
+#include "mojo/shell/app_child_process.h"
+#include "mojo/shell/switches.h"
+
+namespace mojo {
+namespace shell {
+
+ChildProcess::~ChildProcess() {
+}
+
+// static
+scoped_ptr<ChildProcess> ChildProcess::Create(
+ const base::CommandLine& command_line) {
+ if (!command_line.HasSwitch(switches::kChildProcess))
+ return scoped_ptr<ChildProcess>();
+
+ scoped_ptr<ChildProcess> rv(new AppChildProcess());
+ if (!rv)
+ return nullptr;
+
+ rv->platform_channel_ =
+ embedder::PlatformChannelPair::PassClientHandleFromParentProcess(
+ command_line);
+ CHECK(rv->platform_channel_.is_valid());
+ return rv;
+}
+
+ChildProcess::ChildProcess() {
+}
+
+} // namespace shell
+} // namespace mojo
« no previous file with comments | « mojo/shell/child_process.h ('k') | mojo/shell/child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698