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

Unified Diff: chromeos/system/devicemode.cc

Issue 2585633004: ozone: Allow ozone evdev/kvm features to be enabled without running on ChromeOS. (Closed)
Patch Set: rebase Created 3 years, 11 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 | « chromeos/system/devicemode.h ('k') | services/ui/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/system/devicemode.cc
diff --git a/chromeos/system/devicemode.cc b/chromeos/system/devicemode.cc
new file mode 100644
index 0000000000000000000000000000000000000000..01b82fd57284afaf7c42c697f2742c2c522ca17a
--- /dev/null
+++ b/chromeos/system/devicemode.cc
@@ -0,0 +1,21 @@
+// Copyright 2017 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 "chromeos/system/devicemode.h"
+
+#include "base/command_line.h"
+#include "base/sys_info.h"
+#include "chromeos/chromeos_switches.h"
+
+namespace chromeos {
+
+bool IsRunningAsSystemCompositor() {
+ static bool is_running_as_system_compositor =
+ base::SysInfo::IsRunningOnChromeOS() ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kForceSystemCompositorMode);
+ return is_running_as_system_compositor;
+}
+
+} // namespace chromeos
« no previous file with comments | « chromeos/system/devicemode.h ('k') | services/ui/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698