blob: cc6445553184e63d404f578051c803981d5408e0 [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "ash/ash_switches.h"
6
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +01007#include "base/command_line.h"
8
Torne (Richard Coles)58218062012-11-14 11:43:16 +00009namespace ash {
10namespace switches {
11
12// Enables an animated transition from the boot splash screen (Chrome logo on a
13// white background) to the login screen. Implies
14// |kAshCopyHostBackgroundAtBoot| and doesn't make much sense if used in
15// conjunction with |kDisableBootAnimation| (since the transition begins at the
16// same time as the white/grayscale login screen animation).
17const char kAshAnimateFromBootSplashScreen[] =
18 "ash-animate-from-boot-splash-screen";
19
Torne (Richard Coles)58218062012-11-14 11:43:16 +000020// Constrains the pointer movement within a root window on desktop.
21const char kAshConstrainPointerToRoot[] = "ash-constrain-pointer-to-root";
22
23// Copies the host window's content to the system background layer at startup.
24// Can make boot slightly slower, but also hides an even-longer awkward period
25// where we display a white background if the login wallpaper takes a long time
26// to load.
27const char kAshCopyHostBackgroundAtBoot[] = "ash-copy-host-background-at-boot";
28
29// Enable keyboard shortcuts useful for debugging.
30const char kAshDebugShortcuts[] = "ash-debug-shortcuts";
31
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010032// Disable auto window maximization logic.
33const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing";
34
Torne (Richard Coles)58218062012-11-14 11:43:16 +000035// Disable support for auto window placement.
36const char kAshDisableAutoWindowPlacement[] =
37 "ash-enable-auto-window-placement";
38
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000039// Disables the limitter to throttle how quickly a user
40// can change display settings.
41const char kAshDisableDisplayChangeLimiter[] =
42 "ash-disable-display-change-limiter";
43
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010044// Disable the new cras audio handler.
45const char kAshDisableNewAudioHandler[] = "ash-disable-new-audio-handler";
46
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000047// If present new lock animations are enabled.
48const char kAshDisableNewLockAnimations[] = "ash-disable-new-lock-animations";
49
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000050// Disable the per application grouping version of the launcher.
51const char kAshDisablePerAppLauncher[] = "ash-disable-per-app-launcher";
52
53// Disables display rotation.
54const char kAshDisableDisplayRotation[] = "ash-disable-display-rotation";
55
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010056// Disable immersive fullscreen mode, regardless of default setting.
57const char kAshDisableImmersiveFullscreen[] =
58 "ash-disable-immersive-fullscreen";
59
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000060// Disables ui scaling.
61const char kAshDisableUIScaling[] = "ash-disable-ui-scaling";
Torne (Richard Coles)58218062012-11-14 11:43:16 +000062
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +010063#if defined(OS_CHROMEOS)
64// Disable compositor based mirroring.
65const char kAshDisableSoftwareMirroring[] = "ash-disable-software-mirroring";
66#endif
67
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010068// Extend the status tray volume item to allow the user to choose an audio
69// input and output device.
70const char kAshEnableAudioDeviceMenu[] =
71 "ash-enable-audio-device-menu";
72
Torne (Richard Coles)58218062012-11-14 11:43:16 +000073// Enable advanced gestures (e.g. for window management).
74const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures";
75
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000076// Always enable brightness control. Used by machines that don't report their
77// main monitor as internal.
78const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control";
79
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +010080// Enable the dock area on a desktop.
81const char kAshEnableDockedWindows[] = "ash-enable-docked-windows";
82
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010083// Enable immersive fullscreen mode, regardless of default setting.
84const char kAshEnableImmersiveFullscreen[] = "ash-enable-immersive-fullscreen";
85
Torne (Richard Coles)58218062012-11-14 11:43:16 +000086#if defined(OS_LINUX)
87// Enable memory monitoring.
88const char kAshEnableMemoryMonitor[] = "ash-enable-memory-monitor";
89#endif
90
91// Enables the Oak tree viewer.
92const char kAshEnableOak[] = "ash-enable-oak";
93
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010094// Enables "sticky" edges instead of "snap-to-edge"
95const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges";
96
Torne (Richard Coles)58218062012-11-14 11:43:16 +000097// Enables showing the tray bubble by dragging on the shelf.
98const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging";
99
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000100// Enable workspace switching via a three finger vertical scroll.
101const char kAshEnableWorkspaceScrubbing[] = "ash-enable-workspace-scrubbing";
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000102
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100103// Forces chrome to use mirror mode when an external display is connected.
104const char kAshForceMirrorMode[] = "ash-force-mirror-mode";
105
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100106// Hides notifications that are irrelevant to Chrome OS device factory testing,
107// such as battery level updates.
108const char kAshHideNotificationsForFactory[] =
109 "ash-hide-notifications-for-factory";
110
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000111// Sets a window size, optional position, and optional scale factor.
112// "1024x768" creates a window of size 1024x768.
113// "100+200-1024x768" positions the window at 100,200.
114// "1024x768*2" sets the scale factor to 2 for a high DPI display.
115const char kAshHostWindowBounds[] = "ash-host-window-bounds";
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000116
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000117// Hides the small tab indicators at the top of the screen during immersive
118// fullscreen mode.
119const char kAshImmersiveHideTabIndicators[] =
120 "ash-immersive-hide-tab-indicators";
121
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000122// Specifies the layout mode and offsets for the secondary display for
123// testing. The format is "<t|r|b|l>,<offset>" where t=TOP, r=RIGHT,
124// b=BOTTOM and L=LEFT. For example, 'r,-100' means the secondary display
125// is positioned on the right with -100 offset. (above than primary)
126const char kAshSecondaryDisplayLayout[] = "ash-secondary-display-layout";
127
128// Enables the heads-up display for tracking touch points.
129const char kAshTouchHud[] = "ash-touch-hud";
130
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100131// Use alternate layout of the shelf for testing a new look and feel:
132// Slightly smaller profile, only 2 states for the "bar highlight" on
133// launcher buttons, app list icon with more visible state indication,
134// app list icon repositionable and defaulting as 1st item in shelf,
135// more visible state indication for background on status area.
136// crbug's [244983, 244990, 244994, 245005, 245012]
137const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf";
138
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100139// Uses the 1st display in --ash-host-window-bounds as internal display.
140// This is for debugging on linux desktop.
141const char kAshUseFirstDisplayAsInternal[] =
142 "ash-use-first-display-as-internal";
143
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000144// (Most) Chrome OS hardware reports ACPI power button releases correctly.
145// Standard hardware reports releases immediately after presses. If set, we
146// lock the screen or shutdown the system immediately in response to a press
147// instead of displaying an interactive animation.
148const char kAuraLegacyPowerButton[] = "aura-legacy-power-button";
149
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000150#if defined(OS_WIN)
151// Force Ash to open its root window on the desktop, even on Windows 8 where
152// it would normally end up in metro.
153const char kForceAshToDesktop[] = "ash-force-desktop";
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +0100154
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000155#endif
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000156
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100157// Disallow items to be dragged from the app launcher list into the launcher.
158const char kAshDisableDragAndDropAppListToLauncher[] =
159 "ash-disable-drag-and-drop-applist-to-launcher";
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +0100160
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100161// Enables a mode which enforces all browser & application windows to be created
162// in maximized mode.
163const char kForcedMaximizeMode[] = "forced-maximize-mode";
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100164
165bool UseNewAudioHandler() {
166 return !CommandLine::ForCurrentProcess()->
167 HasSwitch(ash::switches::kAshDisableNewAudioHandler);
168}
169
170bool ShowAudioDeviceMenu() {
171 return ash::switches::UseNewAudioHandler() &&
172 CommandLine::ForCurrentProcess()->
173 HasSwitch(ash::switches::kAshEnableAudioDeviceMenu);
174}
175
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100176bool UseAlternateShelfLayout() {
177 return CommandLine::ForCurrentProcess()->
178 HasSwitch(ash::switches::kAshUseAlternateShelfLayout);
179}
180
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000181} // namespace switches
182} // namespace ash