blob: b47ba5090d431bf474edf5a28fcff15f69ba7737 [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 in guest mode (as paths to trusted,
37// non-user-writable JPEG files).
38const char kAshDefaultGuestWallpaperLarge[] =
39 "ash-default-guest-wallpaper-large";
40const char kAshDefaultGuestWallpaperSmall[] =
41 "ash-default-guest-wallpaper-small";
42
43// Default wallpaper to use (as paths to trusted, non-user-writable JPEG files).
44const char kAshDefaultWallpaperLarge[] = "ash-default-wallpaper-large";
45const char kAshDefaultWallpaperSmall[] = "ash-default-wallpaper-small";
46
Ben Murdochca12bfa2013-07-23 11:17:05 +010047#if defined(OS_CHROMEOS)
48// Disable the status tray volume menu for allowing the user to choose an audio
49// input and output device.
50const char kAshDisableAudioDeviceMenu[] =
51 "ash-disable-audio-device-menu";
52#endif
53
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010054// Disable auto window maximization logic.
55const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing";
56
Torne (Richard Coles)58218062012-11-14 11:43:16 +000057// Disable support for auto window placement.
58const char kAshDisableAutoWindowPlacement[] =
59 "ash-enable-auto-window-placement";
60
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000061// Disables the limitter to throttle how quickly a user
62// can change display settings.
63const char kAshDisableDisplayChangeLimiter[] =
64 "ash-disable-display-change-limiter";
65
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000066// If present new lock animations are enabled.
67const char kAshDisableNewLockAnimations[] = "ash-disable-new-lock-animations";
68
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000069// Disable the per application grouping version of the launcher.
70const char kAshDisablePerAppLauncher[] = "ash-disable-per-app-launcher";
71
72// Disables display rotation.
73const char kAshDisableDisplayRotation[] = "ash-disable-display-rotation";
74
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010075// Disable immersive fullscreen mode, regardless of default setting.
76const char kAshDisableImmersiveFullscreen[] =
77 "ash-disable-immersive-fullscreen";
78
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000079// Disables ui scaling.
80const char kAshDisableUIScaling[] = "ash-disable-ui-scaling";
Torne (Richard Coles)58218062012-11-14 11:43:16 +000081
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +010082#if defined(OS_CHROMEOS)
83// Disable compositor based mirroring.
84const char kAshDisableSoftwareMirroring[] = "ash-disable-software-mirroring";
Ben Murdocheb525c52013-07-10 11:40:50 +010085
86// Disable the notification when a low-power USB charger is connected.
87const char kAshDisableUsbChargerNotification[] =
88 "ash-disable-usb-charger-notification";
Ben Murdoch58e6fbe2013-07-26 10:20:38 +010089
90// TODO(jamescook): Remove this unused flag. It exists only to allow the
91// "Enable audio device menu" about:flags item to have the tri-state
92// default/enabled/disabled UI.
93const char kAshEnableAudioDeviceMenu[] = "ash-enable-audio-device-menu";
94#endif // defined(OS_CHROMEOS)
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +010095
Torne (Richard Coles)58218062012-11-14 11:43:16 +000096// Enable advanced gestures (e.g. for window management).
97const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures";
98
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000099// Always enable brightness control. Used by machines that don't report their
100// main monitor as internal.
101const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control";
102
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100103// Enable the dock area on a desktop.
104const char kAshEnableDockedWindows[] = "ash-enable-docked-windows";
105
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100106// Enable immersive fullscreen mode, regardless of default setting.
107const char kAshEnableImmersiveFullscreen[] = "ash-enable-immersive-fullscreen";
108
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000109#if defined(OS_LINUX)
110// Enable memory monitoring.
111const char kAshEnableMemoryMonitor[] = "ash-enable-memory-monitor";
112#endif
113
114// Enables the Oak tree viewer.
115const char kAshEnableOak[] = "ash-enable-oak";
116
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +0100117// Enables overview mode for window switching.
118const char kAshEnableOverviewMode[] = "ash-enable-overview-mode";
119
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100120// Enables "sticky" edges instead of "snap-to-edge"
121const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges";
122
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000123// Enables showing the tray bubble by dragging on the shelf.
124const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging";
125
Torne (Richard Coles)90dce4d2013-05-29 14:40:03 +0100126// Forces chrome to use mirror mode when an external display is connected.
127const char kAshForceMirrorMode[] = "ash-force-mirror-mode";
128
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100129// Hides notifications that are irrelevant to Chrome OS device factory testing,
130// such as battery level updates.
131const char kAshHideNotificationsForFactory[] =
132 "ash-hide-notifications-for-factory";
133
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000134// Sets a window size, optional position, and optional scale factor.
135// "1024x768" creates a window of size 1024x768.
136// "100+200-1024x768" positions the window at 100,200.
137// "1024x768*2" sets the scale factor to 2 for a high DPI display.
138const char kAshHostWindowBounds[] = "ash-host-window-bounds";
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000139
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000140// Hides the small tab indicators at the top of the screen during immersive
141// fullscreen mode.
142const char kAshImmersiveHideTabIndicators[] =
143 "ash-immersive-hide-tab-indicators";
144
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000145// Specifies the layout mode and offsets for the secondary display for
146// testing. The format is "<t|r|b|l>,<offset>" where t=TOP, r=RIGHT,
147// b=BOTTOM and L=LEFT. For example, 'r,-100' means the secondary display
148// is positioned on the right with -100 offset. (above than primary)
149const char kAshSecondaryDisplayLayout[] = "ash-secondary-display-layout";
150
151// Enables the heads-up display for tracking touch points.
152const char kAshTouchHud[] = "ash-touch-hud";
153
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100154// Use alternate layout of the shelf for testing a new look and feel:
155// Slightly smaller profile, only 2 states for the "bar highlight" on
156// launcher buttons, app list icon with more visible state indication,
157// app list icon repositionable and defaulting as 1st item in shelf,
158// more visible state indication for background on status area.
159// crbug's [244983, 244990, 244994, 245005, 245012]
160const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf";
161
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100162// Uses the 1st display in --ash-host-window-bounds as internal display.
163// This is for debugging on linux desktop.
164const char kAshUseFirstDisplayAsInternal[] =
165 "ash-use-first-display-as-internal";
166
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000167// (Most) Chrome OS hardware reports ACPI power button releases correctly.
168// Standard hardware reports releases immediately after presses. If set, we
169// lock the screen or shutdown the system immediately in response to a press
170// instead of displaying an interactive animation.
171const char kAuraLegacyPowerButton[] = "aura-legacy-power-button";
172
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000173#if defined(OS_WIN)
174// Force Ash to open its root window on the desktop, even on Windows 8 where
175// it would normally end up in metro.
176const char kForceAshToDesktop[] = "ash-force-desktop";
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +0100177
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000178#endif
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000179
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +0100180// Disallow items to be dragged from the app launcher list into the launcher.
181const char kAshDisableDragAndDropAppListToLauncher[] =
182 "ash-disable-drag-and-drop-applist-to-launcher";
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +0100183
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100184// Enables a mode which enforces all browser & application windows to be created
185// in maximized mode.
186const char kForcedMaximizeMode[] = "forced-maximize-mode";
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100187
Ben Murdochca12bfa2013-07-23 11:17:05 +0100188bool UseAlternateShelfLayout() {
189 return CommandLine::ForCurrentProcess()->
190 HasSwitch(ash::switches::kAshUseAlternateShelfLayout);
191}
192
193#if defined(OS_CHROMEOS)
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100194bool ShowAudioDeviceMenu() {
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +0100195 return !CommandLine::ForCurrentProcess()->
196 HasSwitch(ash::switches::kAshDisableAudioDeviceMenu);
Torne (Richard Coles)a93a17c2013-05-15 11:34:50 +0100197}
198
Ben Murdocheb525c52013-07-10 11:40:50 +0100199bool UseUsbChargerNotification() {
200 return !CommandLine::ForCurrentProcess()->
201 HasSwitch(ash::switches::kAshDisableUsbChargerNotification);
202}
203#endif
204
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000205} // namespace switches
206} // namespace ash