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"
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
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 #if defined(OS_CHROMEOS)
48 // Disable the status tray volume menu for allowing the user to choose an audio
49 // input and output device.
50 const char kAshDisableAudioDeviceMenu
[] =
51 "ash-disable-audio-device-menu";
54 // Disable auto window maximization logic.
55 const char kAshDisableAutoMaximizing
[] = "ash-disable-auto-maximizing";
57 // Disable support for auto window placement.
58 const char kAshDisableAutoWindowPlacement
[] =
59 "ash-enable-auto-window-placement";
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 the per application grouping version of the launcher.
70 const char kAshDisablePerAppLauncher
[] = "ash-disable-per-app-launcher";
72 // Disables display rotation.
73 const char kAshDisableDisplayRotation
[] = "ash-disable-display-rotation";
75 // Disable immersive fullscreen mode, regardless of default setting.
76 const char kAshDisableImmersiveFullscreen
[] =
77 "ash-disable-immersive-fullscreen";
79 // Disables ui scaling.
80 const char kAshDisableUIScaling
[] = "ash-disable-ui-scaling";
82 #if defined(OS_CHROMEOS)
83 // Disable compositor based mirroring.
84 const char kAshDisableSoftwareMirroring
[] = "ash-disable-software-mirroring";
86 // Disable the notification when a low-power USB charger is connected.
87 const char kAshDisableUsbChargerNotification
[] =
88 "ash-disable-usb-charger-notification";
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.
93 const char kAshEnableAudioDeviceMenu
[] = "ash-enable-audio-device-menu";
94 #endif // defined(OS_CHROMEOS)
96 // Enable advanced gestures (e.g. for window management).
97 const char kAshEnableAdvancedGestures
[] = "ash-enable-advanced-gestures";
99 // Always enable brightness control. Used by machines that don't report their
100 // main monitor as internal.
101 const char kAshEnableBrightnessControl
[] = "ash-enable-brightness-control";
103 // Enable the dock area on a desktop.
104 const char kAshEnableDockedWindows
[] = "ash-enable-docked-windows";
106 // Enable immersive fullscreen mode, regardless of default setting.
107 const char kAshEnableImmersiveFullscreen
[] = "ash-enable-immersive-fullscreen";
109 #if defined(OS_LINUX)
110 // Enable memory monitoring.
111 const char kAshEnableMemoryMonitor
[] = "ash-enable-memory-monitor";
114 // Enables the Oak tree viewer.
115 const char kAshEnableOak
[] = "ash-enable-oak";
117 // Enables overview mode for window switching.
118 const char kAshEnableOverviewMode
[] = "ash-enable-overview-mode";
120 // Enables "sticky" edges instead of "snap-to-edge"
121 const char kAshEnableStickyEdges
[] = "ash-enable-sticky-edges";
123 // Enables showing the tray bubble by dragging on the shelf.
124 const char kAshEnableTrayDragging
[] = "ash-enable-tray-dragging";
126 // Forces chrome to use mirror mode when an external display is connected.
127 const char kAshForceMirrorMode
[] = "ash-force-mirror-mode";
129 // Hides notifications that are irrelevant to Chrome OS device factory testing,
130 // such as battery level updates.
131 const char kAshHideNotificationsForFactory
[] =
132 "ash-hide-notifications-for-factory";
134 // 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.
138 const char kAshHostWindowBounds
[] = "ash-host-window-bounds";
140 // Hides the small tab indicators at the top of the screen during immersive
142 const char kAshImmersiveHideTabIndicators
[] =
143 "ash-immersive-hide-tab-indicators";
145 // 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)
149 const char kAshSecondaryDisplayLayout
[] = "ash-secondary-display-layout";
151 // Enables the heads-up display for tracking touch points.
152 const char kAshTouchHud
[] = "ash-touch-hud";
154 // 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]
160 const char kAshUseAlternateShelfLayout
[] = "ash-use-alternate-shelf";
162 // Flags explicitly show or hide the shelf alignment menu.
163 const char kShowShelfAlignmentMenu
[] = "show-launcher-alignment-menu";
164 const char kHideShelfAlignmentMenu
[] = "hide-launcher-alignment-menu";
166 // Uses the 1st display in --ash-host-window-bounds as internal display.
167 // This is for debugging on linux desktop.
168 const char kAshUseFirstDisplayAsInternal
[] =
169 "ash-use-first-display-as-internal";
171 // (Most) Chrome OS hardware reports ACPI power button releases correctly.
172 // Standard hardware reports releases immediately after presses. If set, we
173 // lock the screen or shutdown the system immediately in response to a press
174 // instead of displaying an interactive animation.
175 const char kAuraLegacyPowerButton
[] = "aura-legacy-power-button";
178 // Force Ash to open its root window on the desktop, even on Windows 8 where
179 // it would normally end up in metro.
180 const char kForceAshToDesktop
[] = "ash-force-desktop";
184 // Disallow items to be dragged from the app launcher list into the launcher.
185 const char kAshDisableDragAndDropAppListToLauncher
[] =
186 "ash-disable-drag-and-drop-applist-to-launcher";
188 // Enables a mode which enforces all browser & application windows to be created
189 // in maximized mode.
190 const char kForcedMaximizeMode
[] = "forced-maximize-mode";
192 bool UseAlternateShelfLayout() {
193 return CommandLine::ForCurrentProcess()->
194 HasSwitch(ash::switches::kAshUseAlternateShelfLayout
);
197 bool ShowShelfAlignmentMenu() {
198 return CommandLine::ForCurrentProcess()->
199 HasSwitch(switches::kShowShelfAlignmentMenu
);
202 #if defined(OS_CHROMEOS)
203 bool ShowAudioDeviceMenu() {
204 return !CommandLine::ForCurrentProcess()->
205 HasSwitch(ash::switches::kAshDisableAudioDeviceMenu
);
208 bool UseUsbChargerNotification() {
209 return !CommandLine::ForCurrentProcess()->
210 HasSwitch(ash::switches::kAshDisableUsbChargerNotification
);
214 } // namespace switches