summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_mode
diff options
context:
space:
mode:
authorzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-31 01:48:33 +0000
committerzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-31 01:48:33 +0000
commit8e837ecd0f4983e7b76f017ac847e3856d30f49d (patch)
tree4e97a1df00b64f1e70932cd6df9893735cd1c07b /chrome/browser/app_mode
parentce24bcddc880734fbeba6861f1e51e5a2365febc (diff)
downloadchromium_src-8e837ecd0f4983e7b76f017ac847e3856d30f49d.zip
chromium_src-8e837ecd0f4983e7b76f017ac847e3856d30f49d.tar.gz
chromium_src-8e837ecd0f4983e7b76f017ac847e3856d30f49d.tar.bz2
Made launcher hidden when kicking off chrome in app mode.
A new switch --force-app-mode has been added for this purpose. On ChromeOS, this switch will also force app install in the next CL. BUG=172988, 173008 TEST=none Review URL: https://codereview.chromium.org/12077055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_mode')
-rw-r--r--chrome/browser/app_mode/app_mode_utils.cc19
-rw-r--r--chrome/browser/app_mode/app_mode_utils.h15
2 files changed, 34 insertions, 0 deletions
diff --git a/chrome/browser/app_mode/app_mode_utils.cc b/chrome/browser/app_mode/app_mode_utils.cc
new file mode 100644
index 0000000..ca3baa5
--- /dev/null
+++ b/chrome/browser/app_mode/app_mode_utils.cc
@@ -0,0 +1,19 @@
+// Copyright (c) 2013 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 "chrome/browser/app_mode/app_mode_utils.h"
+
+#include "base/command_line.h"
+#include "chrome/common/chrome_switches.h"
+
+namespace chrome {
+
+bool IsRunningInAppMode() {
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ return command_line->HasSwitch(switches::kKioskMode) ||
+ (command_line->HasSwitch(switches::kForceAppMode) &&
+ command_line->HasSwitch(switches::kAppId));
+}
+
+} // namespace switches
diff --git a/chrome/browser/app_mode/app_mode_utils.h b/chrome/browser/app_mode/app_mode_utils.h
new file mode 100644
index 0000000..1fe9605
--- /dev/null
+++ b/chrome/browser/app_mode/app_mode_utils.h
@@ -0,0 +1,15 @@
+// Copyright (c) 2013 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.
+
+#ifndef CHROME_BROWSER_APP_MODE_APP_MODE_UTILS_H_
+#define CHROME_BROWSER_APP_MODE_APP_MODE_UTILS_H_
+
+namespace chrome {
+
+// Return true if browser process is run in kiosk or forces app mode.
+bool IsRunningInAppMode();
+
+} // namespace switches
+
+#endif // CHROME_BROWSER_APP_MODE_APP_MODE_UTILS_H_