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

Unified Diff: mash/common/config.cc

Issue 2511233002: Add the beginning of a simple window manager that we'll support on Windows. (Closed)
Patch Set: . Created 4 years 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 | « mash/common/config.h ('k') | mash/login/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/common/config.cc
diff --git a/mash/common/config.cc b/mash/common/config.cc
new file mode 100644
index 0000000000000000000000000000000000000000..48e1354194d3d223bcba7eed482b25d2d1c89e3e
--- /dev/null
+++ b/mash/common/config.cc
@@ -0,0 +1,26 @@
+// Copyright 2016 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 "mash/common/config.h"
+
+#include "base/command_line.h"
+
+namespace mash {
+namespace common {
+
+const char kWindowManagerSwitch[] = "window-manager";
+
+std::string GetWindowManagerServiceName() {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(kWindowManagerSwitch)) {
+ std::string service_name =
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ kWindowManagerSwitch);
+ return service_name;
+ }
+ // TODO(beng): move this constant to a mojom file in //ash.
+ return "ash";
+}
+
+} // namespace common
+} // namespace mash
« no previous file with comments | « mash/common/config.h ('k') | mash/login/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698