| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/ash_switches.h" | 5 #include "ash/ash_switches.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 | 8 |
| 9 namespace ash { | 9 namespace ash { |
| 10 namespace switches { | 10 namespace switches { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #endif | 59 #endif |
| 60 | 60 |
| 61 // Disable auto window maximization logic. | 61 // Disable auto window maximization logic. |
| 62 const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing"; | 62 const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing"; |
| 63 | 63 |
| 64 // Disables the limitter to throttle how quickly a user | 64 // Disables the limitter to throttle how quickly a user |
| 65 // can change display settings. | 65 // can change display settings. |
| 66 const char kAshDisableDisplayChangeLimiter[] = | 66 const char kAshDisableDisplayChangeLimiter[] = |
| 67 "ash-disable-display-change-limiter"; | 67 "ash-disable-display-change-limiter"; |
| 68 | 68 |
| 69 // Disable ability to dock windows at the desktop edge. |
| 70 const char kAshDisableDockedWindows[] = "ash-disable-docked-windows"; |
| 71 |
| 72 // Disallow items to be dragged from the app launcher list into the launcher. |
| 73 const char kAshDisableDragAndDropAppListToLauncher[] = |
| 74 "ash-disable-drag-and-drop-applist-to-launcher"; |
| 75 |
| 76 // Disable dragging items off the shelf to unpin them. |
| 77 const char kAshDisableDragOffShelf[] = "ash-disable-drag-off-shelf"; |
| 78 |
| 79 // Disables overview mode for window switching. |
| 80 const char kAshDisableOverviewMode[] = "ash-disable-overview-mode"; |
| 81 |
| 69 #if defined(OS_CHROMEOS) | 82 #if defined(OS_CHROMEOS) |
| 70 // Disable the notification when a low-power USB charger is connected. | 83 // Disable the notification when a low-power USB charger is connected. |
| 71 const char kAshDisableUsbChargerNotification[] = | 84 const char kAshDisableUsbChargerNotification[] = |
| 72 "ash-disable-usb-charger-notification"; | 85 "ash-disable-usb-charger-notification"; |
| 73 | 86 |
| 74 // TODO(jamescook): Remove this unused flag. It exists only to allow the | 87 // TODO(jamescook): Remove this unused flag. It exists only to allow the |
| 75 // "Enable audio device menu" about:flags item to have the tri-state | 88 // "Enable audio device menu" about:flags item to have the tri-state |
| 76 // default/enabled/disabled UI. | 89 // default/enabled/disabled UI. |
| 77 const char kAshEnableAudioDeviceMenu[] = "ash-enable-audio-device-menu"; | 90 const char kAshEnableAudioDeviceMenu[] = "ash-enable-audio-device-menu"; |
| 78 #endif // defined(OS_CHROMEOS) | 91 #endif // defined(OS_CHROMEOS) |
| 79 | 92 |
| 80 // Enable advanced gestures (e.g. for window management). | 93 // Enable advanced gestures (e.g. for window management). |
| 81 const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures"; | 94 const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures"; |
| 82 | 95 |
| 83 // Use alternate visual style for the caption buttons (minimize, maximize, | 96 // Use alternate visual style for the caption buttons (minimize, maximize, |
| 84 // restore, close). The alternate style: | 97 // restore, close). The alternate style: |
| 85 // - Adds a dedicated button for minimize. | 98 // - Adds a dedicated button for minimize. |
| 86 // - Removes the maximize button's help bubble. | 99 // - Removes the maximize button's help bubble. |
| 87 const char kAshEnableAlternateFrameCaptionButtonStyle[] = | 100 const char kAshEnableAlternateFrameCaptionButtonStyle[] = |
| 88 "ash-enable-alternate-caption-button"; | 101 "ash-enable-alternate-caption-button"; |
| 89 | 102 |
| 90 // Always enable brightness control. Used by machines that don't report their | 103 // Always enable brightness control. Used by machines that don't report their |
| 91 // main monitor as internal. | 104 // main monitor as internal. |
| 92 const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control"; | 105 const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control"; |
| 93 | 106 |
| 94 // Enable ability to dock windows at the desktop edge. | |
| 95 const char kAshEnableDockedWindows[] = "ash-enable-docked-windows"; | |
| 96 | |
| 97 // Disable dragging items off the shelf to unpin them. | |
| 98 const char kAshDisableDragOffShelf[] = "ash-disable-drag-off-shelf"; | |
| 99 | |
| 100 // Enables putting all windows into immersive fullscreen via <F4>. | 107 // Enables putting all windows into immersive fullscreen via <F4>. |
| 101 const char kAshEnableImmersiveFullscreenForAllWindows[] = | 108 const char kAshEnableImmersiveFullscreenForAllWindows[] = |
| 102 "ash-enable-immersive-all-windows"; | 109 "ash-enable-immersive-all-windows"; |
| 103 | 110 |
| 104 #if defined(OS_CHROMEOS) | 111 #if defined(OS_CHROMEOS) |
| 105 // Enables the "full multi profile mode" - as it was in M-31. | 112 // Enables the "full multi profile mode" - as it was in M-31. |
| 106 const char kAshEnableFullMultiProfileMode[] = | 113 const char kAshEnableFullMultiProfileMode[] = |
| 107 "ash-enable-full-multi-profile-mode"; | 114 "ash-enable-full-multi-profile-mode"; |
| 108 #endif | 115 #endif |
| 109 | 116 |
| 110 #if defined(OS_LINUX) | 117 #if defined(OS_LINUX) |
| 111 // Enable memory monitoring. | 118 // Enable memory monitoring. |
| 112 const char kAshEnableMemoryMonitor[] = "ash-enable-memory-monitor"; | 119 const char kAshEnableMemoryMonitor[] = "ash-enable-memory-monitor"; |
| 113 #endif | 120 #endif |
| 114 | 121 |
| 115 #if defined(OS_CHROMEOS) | 122 #if defined(OS_CHROMEOS) |
| 116 // Enables the multi user icons in the system tray. | 123 // Enables the multi user icons in the system tray. |
| 117 const char kAshEnableMultiUserTray[] = "ash-enable-multi-user-tray"; | 124 const char kAshEnableMultiUserTray[] = "ash-enable-multi-user-tray"; |
| 118 #endif | 125 #endif |
| 119 | 126 |
| 120 // Enables the Oak tree viewer. | 127 // Enables the Oak tree viewer. |
| 121 const char kAshEnableOak[] = "ash-enable-oak"; | 128 const char kAshEnableOak[] = "ash-enable-oak"; |
| 122 | 129 |
| 123 // Disables overview mode for window switching. | |
| 124 const char kAshDisableOverviewMode[] = "ash-disable-overview-mode"; | |
| 125 | |
| 126 // Enables software based mirroring. | 130 // Enables software based mirroring. |
| 127 const char kAshEnableSoftwareMirroring[] = "ash-enable-software-mirroring"; | 131 const char kAshEnableSoftwareMirroring[] = "ash-enable-software-mirroring"; |
| 128 | 132 |
| 129 // Enables "sticky" edges instead of "snap-to-edge" | 133 // Enables "sticky" edges instead of "snap-to-edge" |
| 130 const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges"; | 134 const char kAshEnableStickyEdges[] = "ash-enable-sticky-edges"; |
| 131 | 135 |
| 132 // Enables showing the tray bubble by dragging on the shelf. | 136 // Enables showing the tray bubble by dragging on the shelf. |
| 133 const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging"; | 137 const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging"; |
| 134 | 138 |
| 135 // Forces chrome to use mirror mode when an external display is connected. | 139 // Forces chrome to use mirror mode when an external display is connected. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 const char kAshTouchHud[] = "ash-touch-hud"; | 174 const char kAshTouchHud[] = "ash-touch-hud"; |
| 171 | 175 |
| 172 // Use alternate layout of the shelf for testing a new look and feel: | 176 // Use alternate layout of the shelf for testing a new look and feel: |
| 173 // Slightly smaller profile, only 2 states for the "bar highlight" on | 177 // Slightly smaller profile, only 2 states for the "bar highlight" on |
| 174 // launcher buttons, app list icon with more visible state indication, | 178 // launcher buttons, app list icon with more visible state indication, |
| 175 // app list icon repositionable and defaulting as 1st item in shelf, | 179 // app list icon repositionable and defaulting as 1st item in shelf, |
| 176 // more visible state indication for background on status area. | 180 // more visible state indication for background on status area. |
| 177 // crbug's [244983, 244990, 244994, 245005, 245012] | 181 // crbug's [244983, 244990, 244994, 245005, 245012] |
| 178 const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf"; | 182 const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf"; |
| 179 | 183 |
| 180 // Flags explicitly show or hide the shelf alignment menu. | |
| 181 const char kShowShelfAlignmentMenu[] = "show-launcher-alignment-menu"; | |
| 182 const char kHideShelfAlignmentMenu[] = "hide-launcher-alignment-menu"; | |
| 183 | |
| 184 // Uses the 1st display in --ash-host-window-bounds as internal display. | 184 // Uses the 1st display in --ash-host-window-bounds as internal display. |
| 185 // This is for debugging on linux desktop. | 185 // This is for debugging on linux desktop. |
| 186 const char kAshUseFirstDisplayAsInternal[] = | 186 const char kAshUseFirstDisplayAsInternal[] = |
| 187 "ash-use-first-display-as-internal"; | 187 "ash-use-first-display-as-internal"; |
| 188 | 188 |
| 189 // (Most) Chrome OS hardware reports ACPI power button releases correctly. | 189 // (Most) Chrome OS hardware reports ACPI power button releases correctly. |
| 190 // Standard hardware reports releases immediately after presses. If set, we | 190 // Standard hardware reports releases immediately after presses. If set, we |
| 191 // lock the screen or shutdown the system immediately in response to a press | 191 // lock the screen or shutdown the system immediately in response to a press |
| 192 // instead of displaying an interactive animation. | 192 // instead of displaying an interactive animation. |
| 193 const char kAuraLegacyPowerButton[] = "aura-legacy-power-button"; | 193 const char kAuraLegacyPowerButton[] = "aura-legacy-power-button"; |
| 194 | 194 |
| 195 #if defined(OS_WIN) | 195 #if defined(OS_WIN) |
| 196 // Force Ash to open its root window on the desktop, even on Windows 8 where | 196 // Force Ash to open its root window on the desktop, even on Windows 8 where |
| 197 // it would normally end up in metro. | 197 // it would normally end up in metro. |
| 198 const char kForceAshToDesktop[] = "ash-force-desktop"; | 198 const char kForceAshToDesktop[] = "ash-force-desktop"; |
| 199 | 199 |
| 200 #endif | 200 #endif |
| 201 | 201 |
| 202 // Disallow items to be dragged from the app launcher list into the launcher. | 202 // Flags explicitly show or hide the shelf alignment menu. |
| 203 const char kAshDisableDragAndDropAppListToLauncher[] = | 203 const char kShowShelfAlignmentMenu[] = "show-launcher-alignment-menu"; |
| 204 "ash-disable-drag-and-drop-applist-to-launcher"; | 204 const char kHideShelfAlignmentMenu[] = "hide-launcher-alignment-menu"; |
| 205 | 205 |
| 206 bool UseAlternateFrameCaptionButtonStyle() { | 206 bool UseAlternateFrameCaptionButtonStyle() { |
| 207 // For the sake of simplicity, the alternate caption button style is only | 207 // For the sake of simplicity, the alternate caption button style is only |
| 208 // used if snapped windows are always 50% of the screen's width. | 208 // used if snapped windows are always 50% of the screen's width. |
| 209 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 209 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 210 return command_line->HasSwitch(kAshEnableAlternateFrameCaptionButtonStyle) && | 210 return command_line->HasSwitch(kAshEnableAlternateFrameCaptionButtonStyle) && |
| 211 !command_line->HasSwitch(kAshMultipleSnapWindowWidths); | 211 !command_line->HasSwitch(kAshMultipleSnapWindowWidths); |
| 212 } | 212 } |
| 213 | 213 |
| 214 bool UseAlternateShelfLayout() { | 214 bool UseAlternateShelfLayout() { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 244 #else | 244 #else |
| 245 return false; | 245 return false; |
| 246 #endif | 246 #endif |
| 247 } | 247 } |
| 248 | 248 |
| 249 bool UseOverviewMode() { | 249 bool UseOverviewMode() { |
| 250 return !CommandLine::ForCurrentProcess()->HasSwitch(kAshDisableOverviewMode); | 250 return !CommandLine::ForCurrentProcess()->HasSwitch(kAshDisableOverviewMode); |
| 251 } | 251 } |
| 252 | 252 |
| 253 bool UseDockedWindows() { | 253 bool UseDockedWindows() { |
| 254 return CommandLine::ForCurrentProcess()->HasSwitch(kAshEnableDockedWindows); | 254 return !CommandLine::ForCurrentProcess()->HasSwitch(kAshDisableDockedWindows); |
| 255 } | 255 } |
| 256 | 256 |
| 257 #if defined(OS_CHROMEOS) | 257 #if defined(OS_CHROMEOS) |
| 258 bool ShowAudioDeviceMenu() { | 258 bool ShowAudioDeviceMenu() { |
| 259 return !CommandLine::ForCurrentProcess()-> | 259 return !CommandLine::ForCurrentProcess()-> |
| 260 HasSwitch(kAshDisableAudioDeviceMenu); | 260 HasSwitch(kAshDisableAudioDeviceMenu); |
| 261 } | 261 } |
| 262 | 262 |
| 263 bool UseUsbChargerNotification() { | 263 bool UseUsbChargerNotification() { |
| 264 return !CommandLine::ForCurrentProcess()-> | 264 return !CommandLine::ForCurrentProcess()-> |
| 265 HasSwitch(kAshDisableUsbChargerNotification); | 265 HasSwitch(kAshDisableUsbChargerNotification); |
| 266 } | 266 } |
| 267 #endif | 267 #endif |
| 268 | 268 |
| 269 } // namespace switches | 269 } // namespace switches |
| 270 } // namespace ash | 270 } // namespace ash |
| OLD | NEW |