Expose the ability to perform a search from CVC.
[chromium-blink-merge.git] / ash / ash_switches.cc
blobb70c6f92da00db960d0472e74eb9a0754d503754
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 in guest mode (as paths to trusted,
37 // non-user-writable JPEG files).
38 const char kAshDefaultGuestWallpaperLarge[] =
39 "ash-default-guest-wallpaper-large";
40 const char kAshDefaultGuestWallpaperSmall[] =
41 "ash-default-guest-wallpaper-small";
43 // Default wallpaper to use (as paths to trusted, non-user-writable JPEG files).
44 const char kAshDefaultWallpaperLarge[] = "ash-default-wallpaper-large";
45 const char kAshDefaultWallpaperSmall[] = "ash-default-wallpaper-small";
47 // Disable the alternate shelf layout.
48 const char kAshDisableAlternateShelfLayout[] =
49 "ash-disable-alternate-shelf-layout";
51 #if defined(OS_CHROMEOS)
52 // Disable the status tray volume menu for allowing the user to choose an audio
53 // input and output device.
54 const char kAshDisableAudioDeviceMenu[] =
55 "ash-disable-audio-device-menu";
56 #endif
58 // Disable auto window maximization logic.
59 const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing";
61 // Disables the limitter to throttle how quickly a user
62 // can change display settings.
63 const char kAshDisableDisplayChangeLimiter[] =
64 "ash-disable-display-change-limiter";
66 // If present new lock animations are enabled.
67 const char kAshDisableNewLockAnimations[] = "ash-disable-new-lock-animations";
69 // Disable immersive fullscreen mode, regardless of default setting.
70 const char kAshDisableImmersiveFullscreen[] =
71 "ash-disable-immersive-fullscreen";
73 #if defined(OS_CHROMEOS)
74 // Disable compositor based mirroring.
75 const char kAshDisableSoftwareMirroring[] = "ash-disable-software-mirroring";
77 // Disable the notification when a low-power USB charger is connected.
78 const char kAshDisableUsbChargerNotification[] =
79 "ash-disable-usb-charger-notification";
81 // TODO(jamescook): Remove this unused flag. It exists only to allow the
82 // "Enable audio device menu" about:flags item to have the tri-state
83 // default/enabled/disabled UI.
84 const char kAshEnableAudioDeviceMenu[] = "ash-enable-audio-device-menu";
85 #endif // defined(OS_CHROMEOS)
87 // Enable advanced gestures (e.g. for window management).
88 const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures";
90 // Always enable brightness control. Used by machines that don't report their
91 // main monitor as internal.
92 const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control";
94 // Enable the dock area on a desktop.
95 const char kAshEnableDockedWindows[] = "ash-enable-docked-windows";
97 // Disable dragging items off the shelf to unpin them.
98 const char kAshDisableDragOffShelf[] = "ash-disable-drag-off-shelf";
100 // Enable immersive fullscreen mode, regardless of default setting.
101 const char kAshEnableImmersiveFullscreen[] = "ash-enable-immersive-fullscreen";
103 #if defined(OS_LINUX)
104 // Enable memory monitoring.
105 const char kAshEnableMemoryMonitor[] = "ash-enable-memory-monitor";
106 #endif
108 // Enables the Oak tree viewer.
109 const char kAshEnableOak[] = "ash-enable-oak";
111 // Disables overview mode for window switching.
112 const char kAshDisableOverviewMode[] = "ash-disable-overview-mode";
114 // Enables "sticky" edges instead of "snap-to-edge"
115 const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges";
117 // Enables showing the tray bubble by dragging on the shelf.
118 const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging";
120 // Forces chrome to use mirror mode when an external display is connected.
121 const char kAshForceMirrorMode[] = "ash-force-mirror-mode";
123 // Hides notifications that are irrelevant to Chrome OS device factory testing,
124 // such as battery level updates.
125 const char kAshHideNotificationsForFactory[] =
126 "ash-hide-notifications-for-factory";
128 // Sets a window size, optional position, and optional scale factor.
129 // "1024x768" creates a window of size 1024x768.
130 // "100+200-1024x768" positions the window at 100,200.
131 // "1024x768*2" sets the scale factor to 2 for a high DPI display.
132 const char kAshHostWindowBounds[] = "ash-host-window-bounds";
134 // Hides the small tab indicators at the top of the screen during immersive
135 // fullscreen mode.
136 const char kAshImmersiveHideTabIndicators[] =
137 "ash-immersive-hide-tab-indicators";
139 // Specifies the layout mode and offsets for the secondary display for
140 // testing. The format is "<t|r|b|l>,<offset>" where t=TOP, r=RIGHT,
141 // b=BOTTOM and L=LEFT. For example, 'r,-100' means the secondary display
142 // is positioned on the right with -100 offset. (above than primary)
143 const char kAshSecondaryDisplayLayout[] = "ash-secondary-display-layout";
145 // Enables the heads-up display for tracking touch points.
146 const char kAshTouchHud[] = "ash-touch-hud";
148 // Use alternate layout of the shelf for testing a new look and feel:
149 // Slightly smaller profile, only 2 states for the "bar highlight" on
150 // launcher buttons, app list icon with more visible state indication,
151 // app list icon repositionable and defaulting as 1st item in shelf,
152 // more visible state indication for background on status area.
153 // crbug's [244983, 244990, 244994, 245005, 245012]
154 const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf";
156 // Flags explicitly show or hide the shelf alignment menu.
157 const char kShowShelfAlignmentMenu[] = "show-launcher-alignment-menu";
158 const char kHideShelfAlignmentMenu[] = "hide-launcher-alignment-menu";
160 // Uses the 1st display in --ash-host-window-bounds as internal display.
161 // This is for debugging on linux desktop.
162 const char kAshUseFirstDisplayAsInternal[] =
163 "ash-use-first-display-as-internal";
165 // (Most) Chrome OS hardware reports ACPI power button releases correctly.
166 // Standard hardware reports releases immediately after presses. If set, we
167 // lock the screen or shutdown the system immediately in response to a press
168 // instead of displaying an interactive animation.
169 const char kAuraLegacyPowerButton[] = "aura-legacy-power-button";
171 #if defined(OS_WIN)
172 // Force Ash to open its root window on the desktop, even on Windows 8 where
173 // it would normally end up in metro.
174 const char kForceAshToDesktop[] = "ash-force-desktop";
176 #endif
178 // Disallow items to be dragged from the app launcher list into the launcher.
179 const char kAshDisableDragAndDropAppListToLauncher[] =
180 "ash-disable-drag-and-drop-applist-to-launcher";
182 // Enables a mode which enforces all browser & application windows to be created
183 // in maximized mode.
184 const char kForcedMaximizeMode[] = "forced-maximize-mode";
186 bool UseAlternateShelfLayout() {
187 return !CommandLine::ForCurrentProcess()->
188 HasSwitch(ash::switches::kAshDisableAlternateShelfLayout);
191 bool UseDragOffShelf() {
192 return !CommandLine::ForCurrentProcess()->
193 HasSwitch(ash::switches::kAshDisableDragOffShelf);
196 bool ShowShelfAlignmentMenu() {
197 return !CommandLine::ForCurrentProcess()->
198 HasSwitch(switches::kHideShelfAlignmentMenu);
201 #if defined(OS_CHROMEOS)
202 bool ShowAudioDeviceMenu() {
203 return !CommandLine::ForCurrentProcess()->
204 HasSwitch(ash::switches::kAshDisableAudioDeviceMenu);
207 bool UseUsbChargerNotification() {
208 return !CommandLine::ForCurrentProcess()->
209 HasSwitch(ash::switches::kAshDisableUsbChargerNotification);
211 #endif
213 } // namespace switches
214 } // namespace ash