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