blob: 70b1340b289bb486211e3f93c7a771bf72fedb77 [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
Ben Murdoch7dbb3d52013-07-17 14:55:54 +010032// UI to show preferred networks in the status area (for testing).
33const char kAshDebugShowPreferredNetworks[] =
34 "ash-debug-show-preferred-networks";
35
Ben Murdocheb525c52013-07-10 11:40:50 +010036// Default wallpaper to use (as paths to trusted, non-user-writable JPEG files).
37const char kAshDefaultWallpaperLarge[] = "ash-default-wallpaper-large";
38const char kAshDefaultWallpaperSmall[] = "ash-default-wallpaper-small";
39
Torne (Richard Coles)58537e22013-09-12 12:10:22 +010040// Use the normal visual style for the caption buttons (minimize, maximize,
41// restore, close).
42const char kAshDisableAlternateFrameCaptionButtonStyle[] =
43 "ash-disable-alternate-caption-button";
44
45// Disable the alternate shelf layout.
46const char kAshDisableAlternateShelfLayout[] =
47 "ash-disable-alternate-shelf-layout";
48
Ben Murdochca12bfa2013-07-23 11:17:05 +010049#if defined(OS_CHROMEOS)
50// Disable the status tray volume menu for allowing the user to choose an audio
51// input and output device.
52const char kAshDisableAudioDeviceMenu[] =
53 "ash-disable-audio-device-menu";
54#endif
55
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010056// Disable auto window maximization logic.
57const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing";
58
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000059// Disables the limitter to throttle how quickly a user
60// can change display settings.
61const char kAshDisableDisplayChangeLimiter[] =
62 "ash-disable-display-change-limiter";
63
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010064// Disable immersive fullscreen mode, regardless of default setting.
65const char kAshDisableImmersiveFullscreen[] =
66 "ash-disable-immersive-fullscreen";
67
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +010068#if defined(OS_CHROMEOS)
69// Disable compositor based mirroring.
70const char kAshDisableSoftwareMirroring[] = "ash-disable-software-mirroring";
Ben Murdocheb525c52013-07-10 11:40:50 +010071
72// Disable the notification when a low-power USB charger is connected.
73const char kAshDisableUsbChargerNotification[] =
74 "ash-disable-usb-charger-notification";
Ben Murdoch58e6fbe2013-07-26 10:20:38 +010075
76// TODO(jamescook): Remove this unused flag. It exists only to allow the
77// "Enable audio device menu" about:flags item to have the tri-state
78// default/enabled/disabled UI.
79const char kAshEnableAudioDeviceMenu[] = "ash-enable-audio-device-menu";
80#endif // defined(OS_CHROMEOS)
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +010081
Torne (Richard Coles)58218062012-11-14 11:43:16 +000082// Enable advanced gestures (e.g. for window management).
83const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures";
84
Torne (Richard Coles)58537e22013-09-12 12:10:22 +010085// Use alternate visual style for the caption buttons (minimize, maximize,
86// restore, close). The alternate style:
87// - Adds a dedicated button for minimize.
88// - Increases the height of the maximized header.
89// - Removes the maximize button's help bubble.
90// - Switches snapping a window left/right to be always 50%.
91const char kAshEnableAlternateFrameCaptionButtonStyle[] =
92 "ash-enable-alternate-caption-button";
93
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000094// Always enable brightness control. Used by machines that don't report their
95// main monitor as internal.
96const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control";
97
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +010098// Enable the dock area on a desktop.
99const char kAshEnableDockedWindows[] = "ash-enable-docked-windows";
100
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100101// Disable dragging items off the shelf to unpin them.
102const char kAshDisableDragOffShelf[] = "ash-disable-drag-off-shelf";
Torne (Richard Coles)424c4d72013-08-30 15:14:49 +0100103
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100104#if defined(OS_CHROMEOS)
105// Enables the "full multi profile mode" - as it was in M-31.
106const char kAshEnableFullMultiProfileMode[] =
107 "ash-enable-full-multi-profile-mode";
108#endif
109
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100110// Enable immersive fullscreen mode, regardless of default setting.
111const char kAshEnableImmersiveFullscreen[] = "ash-enable-immersive-fullscreen";
112
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000113#if defined(OS_LINUX)
114// Enable memory monitoring.
115const char kAshEnableMemoryMonitor[] = "ash-enable-memory-monitor";
116#endif
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000117// Enables the Oak tree viewer.
118const char kAshEnableOak[] = "ash-enable-oak";
119
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100120// Disables overview mode for window switching.
121const char kAshDisableOverviewMode[] = "ash-disable-overview-mode";
Torne (Richard Coles)68043e12013-09-26 13:24:57 +0100122
123// Enables software based mirroring.
124const char kAshEnableSoftwareMirroring[] = "ash-enable-software-mirroring";
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +0100125
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100126// Enables "sticky" edges instead of "snap-to-edge"
127const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges";
128
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000129// Enables showing the tray bubble by dragging on the shelf.
130const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging";
131
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100132// Forces chrome to use mirror mode when an external display is connected.
133const char kAshForceMirrorMode[] = "ash-force-mirror-mode";
134
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100135// Wallpaper to use in guest mode (as paths to trusted, non-user-writable JPEG
136// files).
137const char kAshGuestWallpaperLarge[] = "ash-guest-wallpaper-large";
138const char kAshGuestWallpaperSmall[] = "ash-guest-wallpaper-small";
139
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100140// Hides notifications that are irrelevant to Chrome OS device factory testing,
141// such as battery level updates.
142const char kAshHideNotificationsForFactory[] =
143 "ash-hide-notifications-for-factory";
144
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000145// Sets a window size, optional position, and optional scale factor.
146// "1024x768" creates a window of size 1024x768.
147// "100+200-1024x768" positions the window at 100,200.
148// "1024x768*2" sets the scale factor to 2 for a high DPI display.
149const char kAshHostWindowBounds[] = "ash-host-window-bounds";
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000150
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000151// Hides the small tab indicators at the top of the screen during immersive
152// fullscreen mode.
153const char kAshImmersiveHideTabIndicators[] =
154 "ash-immersive-hide-tab-indicators";
155
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100156// OEM-supplied wallpaper (as paths to trusted, non-user-writable JPEG files).
157const char kAshOemWallpaperLarge[] = "ash-oem-wallpaper-large";
158const char kAshOemWallpaperSmall[] = "ash-oem-wallpaper-small";
159
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000160// Specifies the layout mode and offsets for the secondary display for
161// testing. The format is "<t|r|b|l>,<offset>" where t=TOP, r=RIGHT,
162// b=BOTTOM and L=LEFT. For example, 'r,-100' means the secondary display
163// is positioned on the right with -100 offset. (above than primary)
164const char kAshSecondaryDisplayLayout[] = "ash-secondary-display-layout";
165
166// Enables the heads-up display for tracking touch points.
167const char kAshTouchHud[] = "ash-touch-hud";
168
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100169// Use alternate layout of the shelf for testing a new look and feel:
170// Slightly smaller profile, only 2 states for the "bar highlight" on
171// launcher buttons, app list icon with more visible state indication,
172// app list icon repositionable and defaulting as 1st item in shelf,
173// more visible state indication for background on status area.
174// crbug's [244983, 244990, 244994, 245005, 245012]
175const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf";
176
Torne (Richard Coles)3551c9c2013-08-23 16:39:15 +0100177// Flags explicitly show or hide the shelf alignment menu.
178const char kShowShelfAlignmentMenu[] = "show-launcher-alignment-menu";
179const char kHideShelfAlignmentMenu[] = "hide-launcher-alignment-menu";
180
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100181// Uses the 1st display in --ash-host-window-bounds as internal display.
182// This is for debugging on linux desktop.
183const char kAshUseFirstDisplayAsInternal[] =
184 "ash-use-first-display-as-internal";
185
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000186// (Most) Chrome OS hardware reports ACPI power button releases correctly.
187// Standard hardware reports releases immediately after presses. If set, we
188// lock the screen or shutdown the system immediately in response to a press
189// instead of displaying an interactive animation.
190const char kAuraLegacyPowerButton[] = "aura-legacy-power-button";
191
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000192#if defined(OS_WIN)
193// Force Ash to open its root window on the desktop, even on Windows 8 where
194// it would normally end up in metro.
195const char kForceAshToDesktop[] = "ash-force-desktop";
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +0100196
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000197#endif
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000198
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100199// Disallow items to be dragged from the app launcher list into the launcher.
200const char kAshDisableDragAndDropAppListToLauncher[] =
201 "ash-disable-drag-and-drop-applist-to-launcher";
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +0100202
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100203bool UseAlternateFrameCaptionButtonStyle() {
Ben Murdochca12bfa2013-07-23 11:17:05 +0100204 return CommandLine::ForCurrentProcess()->
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100205 HasSwitch(kAshEnableAlternateFrameCaptionButtonStyle);
206}
207
208bool UseAlternateShelfLayout() {
209 return !CommandLine::ForCurrentProcess()->
210 HasSwitch(kAshDisableAlternateShelfLayout);
Torne (Richard Coles)3551c9c2013-08-23 16:39:15 +0100211}
212
Torne (Richard Coles)424c4d72013-08-30 15:14:49 +0100213bool UseDragOffShelf() {
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100214 return !CommandLine::ForCurrentProcess()->
215 HasSwitch(kAshDisableDragOffShelf);
Torne (Richard Coles)424c4d72013-08-30 15:14:49 +0100216}
217
Torne (Richard Coles)3551c9c2013-08-23 16:39:15 +0100218bool ShowShelfAlignmentMenu() {
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100219 return !CommandLine::ForCurrentProcess()->
220 HasSwitch(kHideShelfAlignmentMenu);
Ben Murdochca12bfa2013-07-23 11:17:05 +0100221}
222
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100223// Returns true if the full multi profile mode (M-31 version) is active.
224bool UseFullMultiProfileMode() {
Torne (Richard Coles)68043e12013-09-26 13:24:57 +0100225#if defined(OS_CHROMEOS)
226 return CommandLine::ForCurrentProcess()->
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100227 HasSwitch(kAshEnableFullMultiProfileMode);
Torne (Richard Coles)68043e12013-09-26 13:24:57 +0100228#else
229 return false;
230#endif
231}
232
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +0100233bool UseOverviewMode() {
234 return !CommandLine::ForCurrentProcess()->HasSwitch(kAshDisableOverviewMode);
235}
236
Ben Murdochca12bfa2013-07-23 11:17:05 +0100237#if defined(OS_CHROMEOS)
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100238bool ShowAudioDeviceMenu() {
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +0100239 return !CommandLine::ForCurrentProcess()->
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100240 HasSwitch(kAshDisableAudioDeviceMenu);
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100241}
242
Ben Murdocheb525c52013-07-10 11:40:50 +0100243bool UseUsbChargerNotification() {
244 return !CommandLine::ForCurrentProcess()->
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100245 HasSwitch(kAshDisableUsbChargerNotification);
Ben Murdocheb525c52013-07-10 11:40:50 +0100246}
247#endif
248
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000249} // namespace switches
250} // namespace ash