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 | 7dbb3d5 | 2013-07-17 14:55:54 +0100 | [diff] [blame] | 32 | // UI to show preferred networks in the status area (for testing). |
| 33 | const char kAshDebugShowPreferredNetworks[] = |
| 34 | "ash-debug-show-preferred-networks"; |
| 35 | |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 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 | |
Ben Murdoch | ca12bfa | 2013-07-23 11:17:05 +0100 | [diff] [blame] | 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 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 54 | // Disable auto window maximization logic. |
| 55 | const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing"; |
| 56 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 57 | // Disable support for auto window placement. |
| 58 | const char kAshDisableAutoWindowPlacement[] = |
| 59 | "ash-enable-auto-window-placement"; |
| 60 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 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 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 66 | // If present new lock animations are enabled. |
| 67 | const char kAshDisableNewLockAnimations[] = "ash-disable-new-lock-animations"; |
| 68 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 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 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 75 | // Disable immersive fullscreen mode, regardless of default setting. |
| 76 | const char kAshDisableImmersiveFullscreen[] = |
| 77 | "ash-disable-immersive-fullscreen"; |
| 78 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 79 | // Disables ui scaling. |
| 80 | const char kAshDisableUIScaling[] = "ash-disable-ui-scaling"; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 81 | |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 82 | #if defined(OS_CHROMEOS) |
| 83 | // Disable compositor based mirroring. |
| 84 | const char kAshDisableSoftwareMirroring[] = "ash-disable-software-mirroring"; |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 85 | |
| 86 | // Disable the notification when a low-power USB charger is connected. |
| 87 | const char kAshDisableUsbChargerNotification[] = |
| 88 | "ash-disable-usb-charger-notification"; |
Ben Murdoch | 58e6fbe | 2013-07-26 10:20:38 +0100 | [diff] [blame] | 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) |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 95 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 96 | // Enable advanced gestures (e.g. for window management). |
| 97 | const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures"; |
| 98 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 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 | |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 103 | // Enable the dock area on a desktop. |
| 104 | const char kAshEnableDockedWindows[] = "ash-enable-docked-windows"; |
| 105 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 106 | // Enable immersive fullscreen mode, regardless of default setting. |
| 107 | const char kAshEnableImmersiveFullscreen[] = "ash-enable-immersive-fullscreen"; |
| 108 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 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 | |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame^] | 117 | // Enables overview mode for window switching. |
| 118 | const char kAshEnableOverviewMode[] = "ash-enable-overview-mode"; |
| 119 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 120 | // Enables "sticky" edges instead of "snap-to-edge" |
| 121 | const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges"; |
| 122 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 123 | // Enables showing the tray bubble by dragging on the shelf. |
| 124 | const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging"; |
| 125 | |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 126 | // Forces chrome to use mirror mode when an external display is connected. |
| 127 | const char kAshForceMirrorMode[] = "ash-force-mirror-mode"; |
| 128 | |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 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 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 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"; |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 139 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 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 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 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 | |
Torne (Richard Coles) | 7d4cd47 | 2013-06-19 11:58:07 +0100 | [diff] [blame] | 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 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 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 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 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 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 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"; |
Torne (Richard Coles) | b2df76e | 2013-05-13 16:52:09 +0100 | [diff] [blame] | 177 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 178 | #endif |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 179 | |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 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"; |
Torne (Richard Coles) | b2df76e | 2013-05-13 16:52:09 +0100 | [diff] [blame] | 183 | |
Torne (Richard Coles) | c2e0dbd | 2013-05-09 18:35:53 +0100 | [diff] [blame] | 184 | // Enables a mode which enforces all browser & application windows to be created |
| 185 | // in maximized mode. |
| 186 | const char kForcedMaximizeMode[] = "forced-maximize-mode"; |
Torne (Richard Coles) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 187 | |
Ben Murdoch | ca12bfa | 2013-07-23 11:17:05 +0100 | [diff] [blame] | 188 | bool UseAlternateShelfLayout() { |
| 189 | return CommandLine::ForCurrentProcess()-> |
| 190 | HasSwitch(ash::switches::kAshUseAlternateShelfLayout); |
| 191 | } |
| 192 | |
| 193 | #if defined(OS_CHROMEOS) |
Torne (Richard Coles) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 194 | bool ShowAudioDeviceMenu() { |
Torne (Richard Coles) | a36e592 | 2013-08-05 13:57:33 +0100 | [diff] [blame^] | 195 | return !CommandLine::ForCurrentProcess()-> |
| 196 | HasSwitch(ash::switches::kAshDisableAudioDeviceMenu); |
Torne (Richard Coles) | a93a17c | 2013-05-15 11:34:50 +0100 | [diff] [blame] | 197 | } |
| 198 | |
Ben Murdoch | eb525c5 | 2013-07-10 11:40:50 +0100 | [diff] [blame] | 199 | bool UseUsbChargerNotification() { |
| 200 | return !CommandLine::ForCurrentProcess()-> |
| 201 | HasSwitch(ash::switches::kAshDisableUsbChargerNotification); |
| 202 | } |
| 203 | #endif |
| 204 | |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 205 | } // namespace switches |
| 206 | } // namespace ash |