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 26 matching lines...) Expand all Loading... |
37 // non-user-writable JPEG files). | 37 // non-user-writable JPEG files). |
38 const char kAshDefaultGuestWallpaperLarge[] = | 38 const char kAshDefaultGuestWallpaperLarge[] = |
39 "ash-default-guest-wallpaper-large"; | 39 "ash-default-guest-wallpaper-large"; |
40 const char kAshDefaultGuestWallpaperSmall[] = | 40 const char kAshDefaultGuestWallpaperSmall[] = |
41 "ash-default-guest-wallpaper-small"; | 41 "ash-default-guest-wallpaper-small"; |
42 | 42 |
43 // Default wallpaper to use (as paths to trusted, non-user-writable JPEG files). | 43 // Default wallpaper to use (as paths to trusted, non-user-writable JPEG files). |
44 const char kAshDefaultWallpaperLarge[] = "ash-default-wallpaper-large"; | 44 const char kAshDefaultWallpaperLarge[] = "ash-default-wallpaper-large"; |
45 const char kAshDefaultWallpaperSmall[] = "ash-default-wallpaper-small"; | 45 const char kAshDefaultWallpaperSmall[] = "ash-default-wallpaper-small"; |
46 | 46 |
| 47 // Use the normal visual style for the caption buttons (minimize, maximize, |
| 48 // restore, close). |
| 49 const char kAshDisableAlternateFrameCaptionButtonStyle[] = |
| 50 "ash-disable-alternate-caption-button"; |
| 51 |
47 // Disable the alternate shelf layout. | 52 // Disable the alternate shelf layout. |
48 const char kAshDisableAlternateShelfLayout[] = | 53 const char kAshDisableAlternateShelfLayout[] = |
49 "ash-disable-alternate-shelf-layout"; | 54 "ash-disable-alternate-shelf-layout"; |
50 | 55 |
51 #if defined(OS_CHROMEOS) | 56 #if defined(OS_CHROMEOS) |
52 // Disable the status tray volume menu for allowing the user to choose an audio | 57 // Disable the status tray volume menu for allowing the user to choose an audio |
53 // input and output device. | 58 // input and output device. |
54 const char kAshDisableAudioDeviceMenu[] = | 59 const char kAshDisableAudioDeviceMenu[] = |
55 "ash-disable-audio-device-menu"; | 60 "ash-disable-audio-device-menu"; |
56 #endif | 61 #endif |
(...skipping 23 matching lines...) Expand all Loading... |
80 | 85 |
81 // TODO(jamescook): Remove this unused flag. It exists only to allow the | 86 // TODO(jamescook): Remove this unused flag. It exists only to allow the |
82 // "Enable audio device menu" about:flags item to have the tri-state | 87 // "Enable audio device menu" about:flags item to have the tri-state |
83 // default/enabled/disabled UI. | 88 // default/enabled/disabled UI. |
84 const char kAshEnableAudioDeviceMenu[] = "ash-enable-audio-device-menu"; | 89 const char kAshEnableAudioDeviceMenu[] = "ash-enable-audio-device-menu"; |
85 #endif // defined(OS_CHROMEOS) | 90 #endif // defined(OS_CHROMEOS) |
86 | 91 |
87 // Enable advanced gestures (e.g. for window management). | 92 // Enable advanced gestures (e.g. for window management). |
88 const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures"; | 93 const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures"; |
89 | 94 |
| 95 // Use alternate visual style for the caption buttons (minimize, maximize, |
| 96 // restore, close). The alternate style: |
| 97 // - Adds a dedicated button for minimize. |
| 98 // - Increases the height of the maximized header. |
| 99 // - Removes the maximize button's help bubble. |
| 100 // - Switches snapping a window left/right to be always 50%. |
| 101 const char kAshEnableAlternateFrameCaptionButtonStyle[] = |
| 102 "ash-enable-alternate-caption-button"; |
| 103 |
90 // Always enable brightness control. Used by machines that don't report their | 104 // Always enable brightness control. Used by machines that don't report their |
91 // main monitor as internal. | 105 // main monitor as internal. |
92 const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control"; | 106 const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control"; |
93 | 107 |
94 // Enable the dock area on a desktop. | 108 // Enable the dock area on a desktop. |
95 const char kAshEnableDockedWindows[] = "ash-enable-docked-windows"; | 109 const char kAshEnableDockedWindows[] = "ash-enable-docked-windows"; |
96 | 110 |
97 // Disable dragging items off the shelf to unpin them. | 111 // Disable dragging items off the shelf to unpin them. |
98 const char kAshDisableDragOffShelf[] = "ash-disable-drag-off-shelf"; | 112 const char kAshDisableDragOffShelf[] = "ash-disable-drag-off-shelf"; |
99 | 113 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 #endif | 190 #endif |
177 | 191 |
178 // Disallow items to be dragged from the app launcher list into the launcher. | 192 // Disallow items to be dragged from the app launcher list into the launcher. |
179 const char kAshDisableDragAndDropAppListToLauncher[] = | 193 const char kAshDisableDragAndDropAppListToLauncher[] = |
180 "ash-disable-drag-and-drop-applist-to-launcher"; | 194 "ash-disable-drag-and-drop-applist-to-launcher"; |
181 | 195 |
182 // Enables a mode which enforces all browser & application windows to be created | 196 // Enables a mode which enforces all browser & application windows to be created |
183 // in maximized mode. | 197 // in maximized mode. |
184 const char kForcedMaximizeMode[] = "forced-maximize-mode"; | 198 const char kForcedMaximizeMode[] = "forced-maximize-mode"; |
185 | 199 |
| 200 bool UseAlternateFrameCaptionButtonStyle() { |
| 201 return CommandLine::ForCurrentProcess()-> |
| 202 HasSwitch(kAshEnableAlternateFrameCaptionButtonStyle); |
| 203 } |
| 204 |
186 bool UseAlternateShelfLayout() { | 205 bool UseAlternateShelfLayout() { |
187 return !CommandLine::ForCurrentProcess()-> | 206 return !CommandLine::ForCurrentProcess()-> |
188 HasSwitch(ash::switches::kAshDisableAlternateShelfLayout); | 207 HasSwitch(kAshDisableAlternateShelfLayout); |
189 } | 208 } |
190 | 209 |
191 bool UseDragOffShelf() { | 210 bool UseDragOffShelf() { |
192 return !CommandLine::ForCurrentProcess()-> | 211 return !CommandLine::ForCurrentProcess()-> |
193 HasSwitch(ash::switches::kAshDisableDragOffShelf); | 212 HasSwitch(kAshDisableDragOffShelf); |
194 } | 213 } |
195 | 214 |
196 bool ShowShelfAlignmentMenu() { | 215 bool ShowShelfAlignmentMenu() { |
197 return !CommandLine::ForCurrentProcess()-> | 216 return !CommandLine::ForCurrentProcess()-> |
198 HasSwitch(switches::kHideShelfAlignmentMenu); | 217 HasSwitch(kHideShelfAlignmentMenu); |
199 } | 218 } |
200 | 219 |
201 #if defined(OS_CHROMEOS) | 220 #if defined(OS_CHROMEOS) |
202 bool ShowAudioDeviceMenu() { | 221 bool ShowAudioDeviceMenu() { |
203 return !CommandLine::ForCurrentProcess()-> | 222 return !CommandLine::ForCurrentProcess()-> |
204 HasSwitch(ash::switches::kAshDisableAudioDeviceMenu); | 223 HasSwitch(kAshDisableAudioDeviceMenu); |
205 } | 224 } |
206 | 225 |
207 bool UseUsbChargerNotification() { | 226 bool UseUsbChargerNotification() { |
208 return !CommandLine::ForCurrentProcess()-> | 227 return !CommandLine::ForCurrentProcess()-> |
209 HasSwitch(ash::switches::kAshDisableUsbChargerNotification); | 228 HasSwitch(kAshDisableUsbChargerNotification); |
210 } | 229 } |
211 #endif | 230 #endif |
212 | 231 |
213 } // namespace switches | 232 } // namespace switches |
214 } // namespace ash | 233 } // namespace ash |
OLD | NEW |