Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 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 | |
Torne (Richard Coles) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 7 | #include "base/command_line.h" |
| 8 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 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 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 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 | |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame^] | 32 | // Default wallpaper to use in guest mode (as paths to trusted, |
| 33 | // non-user-writable JPEG files). |
| 34 | const char kAshDefaultGuestWallpaperLarge[] = |
| 35 | "ash-default-guest-wallpaper-large"; |
| 36 | const char kAshDefaultGuestWallpaperSmall[] = |
| 37 | "ash-default-guest-wallpaper-small"; |
| 38 | |
| 39 | // Default wallpaper to use (as paths to trusted, non-user-writable JPEG files). |
| 40 | const char kAshDefaultWallpaperLarge[] = "ash-default-wallpaper-large"; |
| 41 | const char kAshDefaultWallpaperSmall[] = "ash-default-wallpaper-small"; |
| 42 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 43 | // Disable auto window maximization logic. |
| 44 | const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing"; |
| 45 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 46 | // Disable support for auto window placement. |
| 47 | const char kAshDisableAutoWindowPlacement[] = |
| 48 | "ash-enable-auto-window-placement"; |
| 49 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 50 | // Disables the limitter to throttle how quickly a user |
| 51 | // can change display settings. |
| 52 | const char kAshDisableDisplayChangeLimiter[] = |
| 53 | "ash-disable-display-change-limiter"; |
| 54 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 55 | // Disable the new cras audio handler. |
| 56 | const char kAshDisableNewAudioHandler[] = "ash-disable-new-audio-handler"; |
| 57 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 58 | // If present new lock animations are enabled. |
| 59 | const char kAshDisableNewLockAnimations[] = "ash-disable-new-lock-animations"; |
| 60 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 61 | // Disable the per application grouping version of the launcher. |
| 62 | const char kAshDisablePerAppLauncher[] = "ash-disable-per-app-launcher"; |
| 63 | |
| 64 | // Disables display rotation. |
| 65 | const char kAshDisableDisplayRotation[] = "ash-disable-display-rotation"; |
| 66 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 67 | // Disable immersive fullscreen mode, regardless of default setting. |
| 68 | const char kAshDisableImmersiveFullscreen[] = |
| 69 | "ash-disable-immersive-fullscreen"; |
| 70 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 71 | // Disables ui scaling. |
| 72 | const char kAshDisableUIScaling[] = "ash-disable-ui-scaling"; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 73 | |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 74 | #if defined(OS_CHROMEOS) |
| 75 | // Disable compositor based mirroring. |
| 76 | const char kAshDisableSoftwareMirroring[] = "ash-disable-software-mirroring"; |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame^] | 77 | |
| 78 | // Disable the notification when a low-power USB charger is connected. |
| 79 | const char kAshDisableUsbChargerNotification[] = |
| 80 | "ash-disable-usb-charger-notification"; |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 81 | #endif |
| 82 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 83 | // Extend the status tray volume item to allow the user to choose an audio |
| 84 | // input and output device. |
| 85 | const char kAshEnableAudioDeviceMenu[] = |
| 86 | "ash-enable-audio-device-menu"; |
| 87 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 88 | // Enable advanced gestures (e.g. for window management). |
| 89 | const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures"; |
| 90 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 91 | // Always enable brightness control. Used by machines that don't report their |
| 92 | // main monitor as internal. |
| 93 | const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control"; |
| 94 | |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 95 | // Enable the dock area on a desktop. |
| 96 | const char kAshEnableDockedWindows[] = "ash-enable-docked-windows"; |
| 97 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 98 | // Enable immersive fullscreen mode, regardless of default setting. |
| 99 | const char kAshEnableImmersiveFullscreen[] = "ash-enable-immersive-fullscreen"; |
| 100 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 101 | #if defined(OS_LINUX) |
| 102 | // Enable memory monitoring. |
| 103 | const char kAshEnableMemoryMonitor[] = "ash-enable-memory-monitor"; |
| 104 | #endif |
| 105 | |
| 106 | // Enables the Oak tree viewer. |
| 107 | const char kAshEnableOak[] = "ash-enable-oak"; |
| 108 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 109 | // Enables "sticky" edges instead of "snap-to-edge" |
| 110 | const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges"; |
| 111 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 112 | // Enables showing the tray bubble by dragging on the shelf. |
| 113 | const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging"; |
| 114 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 115 | // Enable workspace switching via a three finger vertical scroll. |
| 116 | const char kAshEnableWorkspaceScrubbing[] = "ash-enable-workspace-scrubbing"; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 117 | |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 118 | // Forces chrome to use mirror mode when an external display is connected. |
| 119 | const char kAshForceMirrorMode[] = "ash-force-mirror-mode"; |
| 120 | |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 121 | // Hides notifications that are irrelevant to Chrome OS device factory testing, |
| 122 | // such as battery level updates. |
| 123 | const char kAshHideNotificationsForFactory[] = |
| 124 | "ash-hide-notifications-for-factory"; |
| 125 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 126 | // Sets a window size, optional position, and optional scale factor. |
| 127 | // "1024x768" creates a window of size 1024x768. |
| 128 | // "100+200-1024x768" positions the window at 100,200. |
| 129 | // "1024x768*2" sets the scale factor to 2 for a high DPI display. |
| 130 | const char kAshHostWindowBounds[] = "ash-host-window-bounds"; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 131 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 132 | // Hides the small tab indicators at the top of the screen during immersive |
| 133 | // fullscreen mode. |
| 134 | const char kAshImmersiveHideTabIndicators[] = |
| 135 | "ash-immersive-hide-tab-indicators"; |
| 136 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 137 | // Specifies the layout mode and offsets for the secondary display for |
| 138 | // testing. The format is "<t|r|b|l>,<offset>" where t=TOP, r=RIGHT, |
| 139 | // b=BOTTOM and L=LEFT. For example, 'r,-100' means the secondary display |
| 140 | // is positioned on the right with -100 offset. (above than primary) |
| 141 | const char kAshSecondaryDisplayLayout[] = "ash-secondary-display-layout"; |
| 142 | |
| 143 | // Enables the heads-up display for tracking touch points. |
| 144 | const char kAshTouchHud[] = "ash-touch-hud"; |
| 145 | |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 146 | // Use alternate layout of the shelf for testing a new look and feel: |
| 147 | // Slightly smaller profile, only 2 states for the "bar highlight" on |
| 148 | // launcher buttons, app list icon with more visible state indication, |
| 149 | // app list icon repositionable and defaulting as 1st item in shelf, |
| 150 | // more visible state indication for background on status area. |
| 151 | // crbug's [244983, 244990, 244994, 245005, 245012] |
| 152 | const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf"; |
| 153 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 154 | // Uses the 1st display in --ash-host-window-bounds as internal display. |
| 155 | // This is for debugging on linux desktop. |
| 156 | const char kAshUseFirstDisplayAsInternal[] = |
| 157 | "ash-use-first-display-as-internal"; |
| 158 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 159 | // (Most) Chrome OS hardware reports ACPI power button releases correctly. |
| 160 | // Standard hardware reports releases immediately after presses. If set, we |
| 161 | // lock the screen or shutdown the system immediately in response to a press |
| 162 | // instead of displaying an interactive animation. |
| 163 | const char kAuraLegacyPowerButton[] = "aura-legacy-power-button"; |
| 164 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 165 | #if defined(OS_WIN) |
| 166 | // Force Ash to open its root window on the desktop, even on Windows 8 where |
| 167 | // it would normally end up in metro. |
| 168 | const char kForceAshToDesktop[] = "ash-force-desktop"; |
Torne (Richard Coles) | b2df76e | 2013-05-13 16:52:09 +0100 | [diff] [blame] | 169 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 170 | #endif |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 171 | |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 172 | // Disallow items to be dragged from the app launcher list into the launcher. |
| 173 | const char kAshDisableDragAndDropAppListToLauncher[] = |
| 174 | "ash-disable-drag-and-drop-applist-to-launcher"; |
Torne (Richard Coles) | b2df76e | 2013-05-13 16:52:09 +0100 | [diff] [blame] | 175 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 176 | // Enables a mode which enforces all browser & application windows to be created |
| 177 | // in maximized mode. |
| 178 | const char kForcedMaximizeMode[] = "forced-maximize-mode"; |
Torne (Richard Coles) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 179 | |
| 180 | bool UseNewAudioHandler() { |
| 181 | return !CommandLine::ForCurrentProcess()-> |
| 182 | HasSwitch(ash::switches::kAshDisableNewAudioHandler); |
| 183 | } |
| 184 | |
| 185 | bool ShowAudioDeviceMenu() { |
| 186 | return ash::switches::UseNewAudioHandler() && |
| 187 | CommandLine::ForCurrentProcess()-> |
| 188 | HasSwitch(ash::switches::kAshEnableAudioDeviceMenu); |
| 189 | } |
| 190 | |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 191 | bool UseAlternateShelfLayout() { |
| 192 | return CommandLine::ForCurrentProcess()-> |
| 193 | HasSwitch(ash::switches::kAshUseAlternateShelfLayout); |
| 194 | } |
| 195 | |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame^] | 196 | #if defined(OS_CHROMEOS) |
| 197 | bool UseUsbChargerNotification() { |
| 198 | return !CommandLine::ForCurrentProcess()-> |
| 199 | HasSwitch(ash::switches::kAshDisableUsbChargerNotification); |
| 200 | } |
| 201 | #endif |
| 202 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 203 | } // namespace switches |
| 204 | } // namespace ash |