Enable snappy for IndexedDB.
[chromium-blink-merge.git] / ash / ash_switches.cc
blobd72e3f965d3ca5516d2dd38089946ad0e8028e81
1 // 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.
5 #include "ash/ash_switches.h"
7 #include "base/command_line.h"
9 namespace ash {
10 namespace switches {
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).
17 const char kAshAnimateFromBootSplashScreen[] =
18 "ash-animate-from-boot-splash-screen";
20 // Constrains the pointer movement within a root window on desktop.
21 const char kAshConstrainPointerToRoot[] = "ash-constrain-pointer-to-root";
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.
27 const char kAshCopyHostBackgroundAtBoot[] = "ash-copy-host-background-at-boot";
29 // Enable keyboard shortcuts useful for debugging.
30 const char kAshDebugShortcuts[] = "ash-debug-shortcuts";
32 // UI to show preferred networks in the status area (for testing).
33 const char kAshDebugShowPreferredNetworks[] =
34 "ash-debug-show-preferred-networks";
36 // Default wallpaper to use (as paths to trusted, non-user-writable JPEG files).
37 const char kAshDefaultWallpaperLarge[] = "ash-default-wallpaper-large";
38 const char kAshDefaultWallpaperSmall[] = "ash-default-wallpaper-small";
40 // Use the normal visual style for the caption buttons (minimize, maximize,
41 // restore, close).
42 const char kAshDisableAlternateFrameCaptionButtonStyle[] =
43 "ash-disable-alternate-caption-button";
45 // Disable the alternate shelf layout.
46 const char kAshDisableAlternateShelfLayout[] =
47 "ash-disable-alternate-shelf-layout";
49 #if defined(OS_CHROMEOS)
50 // Disable the status tray volume menu for allowing the user to choose an audio
51 // input and output device.
52 const char kAshDisableAudioDeviceMenu[] =
53 "ash-disable-audio-device-menu";
54 #endif
56 // Disable auto window maximization logic.
57 const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing";
59 // Disables the limitter to throttle how quickly a user
60 // can change display settings.
61 const char kAshDisableDisplayChangeLimiter[] =
62 "ash-disable-display-change-limiter";
64 // Disable immersive fullscreen mode, regardless of default setting.
65 const char kAshDisableImmersiveFullscreen[] =
66 "ash-disable-immersive-fullscreen";
68 #if defined(OS_CHROMEOS)
69 // Disable compositor based mirroring.
70 const char kAshDisableSoftwareMirroring[] = "ash-disable-software-mirroring";
72 // Disable the notification when a low-power USB charger is connected.
73 const char kAshDisableUsbChargerNotification[] =
74 "ash-disable-usb-charger-notification";
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.
79 const char kAshEnableAudioDeviceMenu[] = "ash-enable-audio-device-menu";
80 #endif // defined(OS_CHROMEOS)
82 // Enable advanced gestures (e.g. for window management).
83 const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures";
85 // 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%.
91 const char kAshEnableAlternateFrameCaptionButtonStyle[] =
92 "ash-enable-alternate-caption-button";
94 // Always enable brightness control. Used by machines that don't report their
95 // main monitor as internal.
96 const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control";
98 // Enable the dock area on a desktop.
99 const char kAshEnableDockedWindows[] = "ash-enable-docked-windows";
101 // Disable dragging items off the shelf to unpin them.
102 const char kAshDisableDragOffShelf[] = "ash-disable-drag-off-shelf";
104 #if defined(OS_CHROMEOS)
105 // Enables the "full multi profile mode" - as it was in M-31.
106 const char kAshEnableFullMultiProfileMode[] =
107 "ash-enable-full-multi-profile-mode";
108 #endif
110 // Enable immersive fullscreen mode, regardless of default setting.
111 const char kAshEnableImmersiveFullscreen[] = "ash-enable-immersive-fullscreen";
113 #if defined(OS_LINUX)
114 // Enable memory monitoring.
115 const char kAshEnableMemoryMonitor[] = "ash-enable-memory-monitor";
116 #endif
117 #if defined(OS_CHROMEOS)
118 // Enable the shelf menu for multi profile usage.
119 const char kAshEnableMultiProfileShelfMenu[] = "ash-enable-multi-profile-shelf";
120 #endif
121 // Enables the Oak tree viewer.
122 const char kAshEnableOak[] = "ash-enable-oak";
124 // Disables overview mode for window switching.
125 const char kAshDisableOverviewMode[] = "ash-disable-overview-mode";
127 // Enables software based mirroring.
128 const char kAshEnableSoftwareMirroring[] = "ash-enable-software-mirroring";
130 // Enables "sticky" edges instead of "snap-to-edge"
131 const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges";
133 // Enables showing the tray bubble by dragging on the shelf.
134 const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging";
136 // Forces chrome to use mirror mode when an external display is connected.
137 const char kAshForceMirrorMode[] = "ash-force-mirror-mode";
139 // Wallpaper to use in guest mode (as paths to trusted, non-user-writable JPEG
140 // files).
141 const char kAshGuestWallpaperLarge[] = "ash-guest-wallpaper-large";
142 const char kAshGuestWallpaperSmall[] = "ash-guest-wallpaper-small";
144 // Hides notifications that are irrelevant to Chrome OS device factory testing,
145 // such as battery level updates.
146 const char kAshHideNotificationsForFactory[] =
147 "ash-hide-notifications-for-factory";
149 // Sets a window size, optional position, and optional scale factor.
150 // "1024x768" creates a window of size 1024x768.
151 // "100+200-1024x768" positions the window at 100,200.
152 // "1024x768*2" sets the scale factor to 2 for a high DPI display.
153 const char kAshHostWindowBounds[] = "ash-host-window-bounds";
155 // Hides the small tab indicators at the top of the screen during immersive
156 // fullscreen mode.
157 const char kAshImmersiveHideTabIndicators[] =
158 "ash-immersive-hide-tab-indicators";
160 // OEM-supplied wallpaper (as paths to trusted, non-user-writable JPEG files).
161 const char kAshOemWallpaperLarge[] = "ash-oem-wallpaper-large";
162 const char kAshOemWallpaperSmall[] = "ash-oem-wallpaper-small";
164 // Specifies the layout mode and offsets for the secondary display for
165 // testing. The format is "<t|r|b|l>,<offset>" where t=TOP, r=RIGHT,
166 // b=BOTTOM and L=LEFT. For example, 'r,-100' means the secondary display
167 // is positioned on the right with -100 offset. (above than primary)
168 const char kAshSecondaryDisplayLayout[] = "ash-secondary-display-layout";
170 // Enables the heads-up display for tracking touch points.
171 const char kAshTouchHud[] = "ash-touch-hud";
173 // Use alternate layout of the shelf for testing a new look and feel:
174 // Slightly smaller profile, only 2 states for the "bar highlight" on
175 // launcher buttons, app list icon with more visible state indication,
176 // app list icon repositionable and defaulting as 1st item in shelf,
177 // more visible state indication for background on status area.
178 // crbug's [244983, 244990, 244994, 245005, 245012]
179 const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf";
181 // Flags explicitly show or hide the shelf alignment menu.
182 const char kShowShelfAlignmentMenu[] = "show-launcher-alignment-menu";
183 const char kHideShelfAlignmentMenu[] = "hide-launcher-alignment-menu";
185 // Uses the 1st display in --ash-host-window-bounds as internal display.
186 // This is for debugging on linux desktop.
187 const char kAshUseFirstDisplayAsInternal[] =
188 "ash-use-first-display-as-internal";
190 // (Most) Chrome OS hardware reports ACPI power button releases correctly.
191 // Standard hardware reports releases immediately after presses. If set, we
192 // lock the screen or shutdown the system immediately in response to a press
193 // instead of displaying an interactive animation.
194 const char kAuraLegacyPowerButton[] = "aura-legacy-power-button";
196 #if defined(OS_WIN)
197 // Force Ash to open its root window on the desktop, even on Windows 8 where
198 // it would normally end up in metro.
199 const char kForceAshToDesktop[] = "ash-force-desktop";
201 #endif
203 // Disallow items to be dragged from the app launcher list into the launcher.
204 const char kAshDisableDragAndDropAppListToLauncher[] =
205 "ash-disable-drag-and-drop-applist-to-launcher";
207 bool UseAlternateFrameCaptionButtonStyle() {
208 return CommandLine::ForCurrentProcess()->
209 HasSwitch(kAshEnableAlternateFrameCaptionButtonStyle);
212 bool UseAlternateShelfLayout() {
213 return !CommandLine::ForCurrentProcess()->
214 HasSwitch(kAshDisableAlternateShelfLayout);
217 bool UseDragOffShelf() {
218 return !CommandLine::ForCurrentProcess()->
219 HasSwitch(kAshDisableDragOffShelf);
222 bool ShowShelfAlignmentMenu() {
223 return !CommandLine::ForCurrentProcess()->
224 HasSwitch(kHideShelfAlignmentMenu);
227 // Returns true if the full multi profile mode (M-31 version) is active.
228 bool UseFullMultiProfileMode() {
229 #if defined(OS_CHROMEOS)
230 return CommandLine::ForCurrentProcess()->
231 HasSwitch(kAshEnableFullMultiProfileMode);
232 #else
233 return false;
234 #endif
237 // Returns true if the MultiProfile shelf menu should be shown.
238 bool ShowMultiProfileShelfMenu() {
239 #if defined(OS_CHROMEOS)
240 return CommandLine::ForCurrentProcess()->
241 HasSwitch(kAshEnableMultiProfileShelfMenu);
242 #else
243 return false;
244 #endif
247 #if defined(OS_CHROMEOS)
248 bool ShowAudioDeviceMenu() {
249 return !CommandLine::ForCurrentProcess()->
250 HasSwitch(kAshDisableAudioDeviceMenu);
253 bool UseUsbChargerNotification() {
254 return !CommandLine::ForCurrentProcess()->
255 HasSwitch(kAshDisableUsbChargerNotification);
257 #endif
259 } // namespace switches
260 } // namespace ash