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. 4 5 #include "ash/ash_switches.h" 6 7 #include "base/command_line.h" 8 9 namespace ash { 10 namespace 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). 17 const char kAshAnimateFromBootSplashScreen[] = 18 "ash-animate-from-boot-splash-screen"; 19 20 // Constrains the pointer movement within a root window on desktop. 21 const 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. 27 const char kAshCopyHostBackgroundAtBoot[] = "ash-copy-host-background-at-boot"; 28 29 // Enable keyboard shortcuts useful for debugging. 30 const char kAshDebugShortcuts[] = "ash-debug-shortcuts"; 31 32 // UI to show preferred networks in the status area (for testing). 33 const char kAshDebugShowPreferredNetworks[] = 34 "ash-debug-show-preferred-networks"; 35 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"; 42 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"; 46 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"; 52 #endif 53 54 // Disable auto window maximization logic. 55 const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing"; 56 57 // Disable support for auto window placement. 58 const char kAshDisableAutoWindowPlacement[] = 59 "ash-enable-auto-window-placement"; 60 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"; 65 66 // If present new lock animations are enabled. 67 const char kAshDisableNewLockAnimations[] = "ash-disable-new-lock-animations"; 68 69 // Disable the per application grouping version of the launcher. 70 const char kAshDisablePerAppLauncher[] = "ash-disable-per-app-launcher"; 71 72 // Disables display rotation. 73 const char kAshDisableDisplayRotation[] = "ash-disable-display-rotation"; 74 75 // Disable immersive fullscreen mode, regardless of default setting. 76 const char kAshDisableImmersiveFullscreen[] = 77 "ash-disable-immersive-fullscreen"; 78 79 // Disables ui scaling. 80 const char kAshDisableUIScaling[] = "ash-disable-ui-scaling"; 81 82 #if defined(OS_CHROMEOS) 83 // Disable compositor based mirroring. 84 const char kAshDisableSoftwareMirroring[] = "ash-disable-software-mirroring"; 85 86 // Disable the notification when a low-power USB charger is connected. 87 const char kAshDisableUsbChargerNotification[] = 88 "ash-disable-usb-charger-notification"; 89 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) 95 96 // Enable advanced gestures (e.g. for window management). 97 const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures"; 98 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"; 102 103 // Enable the dock area on a desktop. 104 const char kAshEnableDockedWindows[] = "ash-enable-docked-windows"; 105 106 // Enable immersive fullscreen mode, regardless of default setting. 107 const char kAshEnableImmersiveFullscreen[] = "ash-enable-immersive-fullscreen"; 108 109 #if defined(OS_LINUX) 110 // Enable memory monitoring. 111 const char kAshEnableMemoryMonitor[] = "ash-enable-memory-monitor"; 112 #endif 113 114 // Enables the Oak tree viewer. 115 const char kAshEnableOak[] = "ash-enable-oak"; 116 117 // Enables overview mode for window switching. 118 const char kAshEnableOverviewMode[] = "ash-enable-overview-mode"; 119 120 // Enables "sticky" edges instead of "snap-to-edge" 121 const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges"; 122 123 // Enables showing the tray bubble by dragging on the shelf. 124 const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging"; 125 126 // Forces chrome to use mirror mode when an external display is connected. 127 const char kAshForceMirrorMode[] = "ash-force-mirror-mode"; 128 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"; 133 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"; 139 140 // Hides the small tab indicators at the top of the screen during immersive 141 // fullscreen mode. 142 const char kAshImmersiveHideTabIndicators[] = 143 "ash-immersive-hide-tab-indicators"; 144 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"; 150 151 // Enables the heads-up display for tracking touch points. 152 const char kAshTouchHud[] = "ash-touch-hud"; 153 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"; 161 162 // Uses the 1st display in --ash-host-window-bounds as internal display. 163 // This is for debugging on linux desktop. 164 const char kAshUseFirstDisplayAsInternal[] = 165 "ash-use-first-display-as-internal"; 166 167 // (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. 171 const char kAuraLegacyPowerButton[] = "aura-legacy-power-button"; 172 173 #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. 176 const char kForceAshToDesktop[] = "ash-force-desktop"; 177 178 #endif 179 180 // Disallow items to be dragged from the app launcher list into the launcher. 181 const char kAshDisableDragAndDropAppListToLauncher[] = 182 "ash-disable-drag-and-drop-applist-to-launcher"; 183 184 // Enables a mode which enforces all browser & application windows to be created 185 // in maximized mode. 186 const char kForcedMaximizeMode[] = "forced-maximize-mode"; 187 188 bool UseAlternateShelfLayout() { 189 return CommandLine::ForCurrentProcess()-> 190 HasSwitch(ash::switches::kAshUseAlternateShelfLayout); 191 } 192 193 #if defined(OS_CHROMEOS) 194 bool ShowAudioDeviceMenu() { 195 return !CommandLine::ForCurrentProcess()-> 196 HasSwitch(ash::switches::kAshDisableAudioDeviceMenu); 197 } 198 199 bool UseUsbChargerNotification() { 200 return !CommandLine::ForCurrentProcess()-> 201 HasSwitch(ash::switches::kAshDisableUsbChargerNotification); 202 } 203 #endif 204 205 } // namespace switches 206 } // namespace ash 207