[Android WebView] Check AwContentsIoThreadClient usage
[chromium-blink-merge.git] / ash / ash_switches.cc
blob004876de74c18793235ff3e0e1d74e40b359ecd4
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 // Enable immersive fullscreen mode, regardless of default setting.
105 const char kAshEnableImmersiveFullscreen[] = "ash-enable-immersive-fullscreen";
107 #if defined(OS_LINUX)
108 // Enable memory monitoring.
109 const char kAshEnableMemoryMonitor[] = "ash-enable-memory-monitor";
110 #endif
111 #if defined(OS_CHROMEOS)
112 // Enable the shelf menu for multi profile usage.
113 const char kAshEnableMultiProfileShelfMenu[] = "ash-enable-multi-profile-shelf";
114 #endif
115 // Enables the Oak tree viewer.
116 const char kAshEnableOak[] = "ash-enable-oak";
118 // Disables overview mode for window switching.
119 const char kAshDisableOverviewMode[] = "ash-disable-overview-mode";
121 // Enables software based mirroring.
122 const char kAshEnableSoftwareMirroring[] = "ash-enable-software-mirroring";
124 // Enables "sticky" edges instead of "snap-to-edge"
125 const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges";
127 // Enables showing the tray bubble by dragging on the shelf.
128 const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging";
130 // Forces chrome to use mirror mode when an external display is connected.
131 const char kAshForceMirrorMode[] = "ash-force-mirror-mode";
133 // Wallpaper to use in guest mode (as paths to trusted, non-user-writable JPEG
134 // files).
135 const char kAshGuestWallpaperLarge[] = "ash-guest-wallpaper-large";
136 const char kAshGuestWallpaperSmall[] = "ash-guest-wallpaper-small";
138 // Hides notifications that are irrelevant to Chrome OS device factory testing,
139 // such as battery level updates.
140 const char kAshHideNotificationsForFactory[] =
141 "ash-hide-notifications-for-factory";
143 // Sets a window size, optional position, and optional scale factor.
144 // "1024x768" creates a window of size 1024x768.
145 // "100+200-1024x768" positions the window at 100,200.
146 // "1024x768*2" sets the scale factor to 2 for a high DPI display.
147 const char kAshHostWindowBounds[] = "ash-host-window-bounds";
149 // Hides the small tab indicators at the top of the screen during immersive
150 // fullscreen mode.
151 const char kAshImmersiveHideTabIndicators[] =
152 "ash-immersive-hide-tab-indicators";
154 // OEM-supplied wallpaper (as paths to trusted, non-user-writable JPEG files).
155 const char kAshOemWallpaperLarge[] = "ash-oem-wallpaper-large";
156 const char kAshOemWallpaperSmall[] = "ash-oem-wallpaper-small";
158 // Specifies the layout mode and offsets for the secondary display for
159 // testing. The format is "<t|r|b|l>,<offset>" where t=TOP, r=RIGHT,
160 // b=BOTTOM and L=LEFT. For example, 'r,-100' means the secondary display
161 // is positioned on the right with -100 offset. (above than primary)
162 const char kAshSecondaryDisplayLayout[] = "ash-secondary-display-layout";
164 // Enables the heads-up display for tracking touch points.
165 const char kAshTouchHud[] = "ash-touch-hud";
167 // Use alternate layout of the shelf for testing a new look and feel:
168 // Slightly smaller profile, only 2 states for the "bar highlight" on
169 // launcher buttons, app list icon with more visible state indication,
170 // app list icon repositionable and defaulting as 1st item in shelf,
171 // more visible state indication for background on status area.
172 // crbug's [244983, 244990, 244994, 245005, 245012]
173 const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf";
175 // Flags explicitly show or hide the shelf alignment menu.
176 const char kShowShelfAlignmentMenu[] = "show-launcher-alignment-menu";
177 const char kHideShelfAlignmentMenu[] = "hide-launcher-alignment-menu";
179 // Uses the 1st display in --ash-host-window-bounds as internal display.
180 // This is for debugging on linux desktop.
181 const char kAshUseFirstDisplayAsInternal[] =
182 "ash-use-first-display-as-internal";
184 // (Most) Chrome OS hardware reports ACPI power button releases correctly.
185 // Standard hardware reports releases immediately after presses. If set, we
186 // lock the screen or shutdown the system immediately in response to a press
187 // instead of displaying an interactive animation.
188 const char kAuraLegacyPowerButton[] = "aura-legacy-power-button";
190 #if defined(OS_WIN)
191 // Force Ash to open its root window on the desktop, even on Windows 8 where
192 // it would normally end up in metro.
193 const char kForceAshToDesktop[] = "ash-force-desktop";
195 #endif
197 // Disallow items to be dragged from the app launcher list into the launcher.
198 const char kAshDisableDragAndDropAppListToLauncher[] =
199 "ash-disable-drag-and-drop-applist-to-launcher";
201 // Enables a mode which enforces all browser & application windows to be created
202 // in maximized mode.
203 const char kForcedMaximizeMode[] = "forced-maximize-mode";
205 bool UseAlternateFrameCaptionButtonStyle() {
206 return CommandLine::ForCurrentProcess()->
207 HasSwitch(kAshEnableAlternateFrameCaptionButtonStyle);
210 bool UseAlternateShelfLayout() {
211 return !CommandLine::ForCurrentProcess()->
212 HasSwitch(kAshDisableAlternateShelfLayout);
215 bool UseDragOffShelf() {
216 return !CommandLine::ForCurrentProcess()->
217 HasSwitch(kAshDisableDragOffShelf);
220 bool ShowShelfAlignmentMenu() {
221 return !CommandLine::ForCurrentProcess()->
222 HasSwitch(kHideShelfAlignmentMenu);
225 // Returns true if the MultiProfile shelf menu should be shown.
226 bool ShowMultiProfileShelfMenu() {
227 #if defined(OS_CHROMEOS)
228 return CommandLine::ForCurrentProcess()->
229 HasSwitch(kAshEnableMultiProfileShelfMenu);
230 #else
231 return false;
232 #endif
235 #if defined(OS_CHROMEOS)
236 bool ShowAudioDeviceMenu() {
237 return !CommandLine::ForCurrentProcess()->
238 HasSwitch(kAshDisableAudioDeviceMenu);
241 bool UseUsbChargerNotification() {
242 return !CommandLine::ForCurrentProcess()->
243 HasSwitch(kAshDisableUsbChargerNotification);
245 #endif
247 } // namespace switches
248 } // namespace ash