blob: a96fafda8c9cd84f7edc63d84a665d99de3a9cb5 [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001// 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)a93a17c2013-05-15 11:34:50 +01007#include "base/command_line.h"
8
Torne (Richard Coles)58218062012-11-14 11:43:16 +00009namespace ash {
10namespace 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).
17const char kAshAnimateFromBootSplashScreen[] =
18 "ash-animate-from-boot-splash-screen";
19
Torne (Richard Coles)58218062012-11-14 11:43:16 +000020// Constrains the pointer movement within a root window on desktop.
21const 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.
27const char kAshCopyHostBackgroundAtBoot[] = "ash-copy-host-background-at-boot";
28
29// Enable keyboard shortcuts useful for debugging.
30const char kAshDebugShortcuts[] = "ash-debug-shortcuts";
31
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +000032// Indicates that the wallpaper images specified by
33// kAshDefaultWallpaper{Large,Small} are OEM-specific (i.e. they are not
34// downloadable from Google).
35const char kAshDefaultWallpaperIsOem[] = "ash-default-wallpaper-is-oem";
36
Ben Murdocheb525c52013-07-10 11:40:50 +010037// Default wallpaper to use (as paths to trusted, non-user-writable JPEG files).
38const char kAshDefaultWallpaperLarge[] = "ash-default-wallpaper-large";
39const char kAshDefaultWallpaperSmall[] = "ash-default-wallpaper-small";
40
Torne (Richard Coles)58537e22013-09-12 12:10:22 +010041// Use the normal visual style for the caption buttons (minimize, maximize,
42// restore, close).
43const char kAshDisableAlternateFrameCaptionButtonStyle[] =
44 "ash-disable-alternate-caption-button";
45
46// Disable the alternate shelf layout.
47const char kAshDisableAlternateShelfLayout[] =
48 "ash-disable-alternate-shelf-layout";
49
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +000050// Disable ability to dock windows at the desktop edge.
51const char kAshDisableDockedWindows[] = "ash-disable-docked-windows";
52
Torne (Richard Coles)58537e22013-09-12 12:10:22 +010053// Use alternate visual style for the caption buttons (minimize, maximize,
54// restore, close). The alternate style:
55// - Adds a dedicated button for minimize.
Torne (Richard Coles)58537e22013-09-12 12:10:22 +010056// - Removes the maximize button's help bubble.
Torne (Richard Coles)58537e22013-09-12 12:10:22 +010057const char kAshEnableAlternateFrameCaptionButtonStyle[] =
58 "ash-enable-alternate-caption-button";
59
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000060// Always enable brightness control. Used by machines that don't report their
61// main monitor as internal.
62const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control";
63
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +000064#if defined(OS_CHROMEOS)
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +000065// Enables key bindings to scroll magnified screen.
66const char kAshEnableMagnifierKeyScroller[] =
67 "ash-enable-magnifier-key-scroller";
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +000068#endif
69
Torne (Richard Coles)68043e12013-09-26 13:24:57 +010070// Enables software based mirroring.
71const char kAshEnableSoftwareMirroring[] = "ash-enable-software-mirroring";
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +010072
Torne (Richard Coles)a1401312014-03-18 10:20:56 +000073// Enables touch view testing.
74const char kAshEnableTouchViewTesting[] = "ash-enable-touch-view-testing";
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010075
Torne (Richard Coles)5d1f7b12014-02-21 12:16:55 +000076// When this flag is set, system sounds will be played whether the
77// ChromeVox is enabled or not.
78const char kAshEnableSystemSounds[] = "ash-enable-system-sounds";
79
Torne (Richard Coles)58218062012-11-14 11:43:16 +000080// Enables showing the tray bubble by dragging on the shelf.
81const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging";
82
Torne (Richard Coles)4e180b62013-10-18 15:46:22 +010083// Wallpaper to use in guest mode (as paths to trusted, non-user-writable JPEG
84// files).
85const char kAshGuestWallpaperLarge[] = "ash-guest-wallpaper-large";
86const char kAshGuestWallpaperSmall[] = "ash-guest-wallpaper-small";
87
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +010088// Hides notifications that are irrelevant to Chrome OS device factory testing,
89// such as battery level updates.
90const char kAshHideNotificationsForFactory[] =
91 "ash-hide-notifications-for-factory";
92
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000093// Sets a window size, optional position, and optional scale factor.
94// "1024x768" creates a window of size 1024x768.
95// "100+200-1024x768" positions the window at 100,200.
96// "1024x768*2" sets the scale factor to 2 for a high DPI display.
97const char kAshHostWindowBounds[] = "ash-host-window-bounds";
Torne (Richard Coles)58218062012-11-14 11:43:16 +000098
Torne (Richard Coles)58218062012-11-14 11:43:16 +000099// Specifies the layout mode and offsets for the secondary display for
100// testing. The format is "<t|r|b|l>,<offset>" where t=TOP, r=RIGHT,
101// b=BOTTOM and L=LEFT. For example, 'r,-100' means the secondary display
102// is positioned on the right with -100 offset. (above than primary)
103const char kAshSecondaryDisplayLayout[] = "ash-secondary-display-layout";
104
105// Enables the heads-up display for tracking touch points.
106const char kAshTouchHud[] = "ash-touch-hud";
107
Torne (Richard Coles)7d4cd472013-06-19 11:58:07 +0100108// Use alternate layout of the shelf for testing a new look and feel:
109// Slightly smaller profile, only 2 states for the "bar highlight" on
110// launcher buttons, app list icon with more visible state indication,
111// app list icon repositionable and defaulting as 1st item in shelf,
112// more visible state indication for background on status area.
113// crbug's [244983, 244990, 244994, 245005, 245012]
114const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf";
115
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +0100116// Uses the 1st display in --ash-host-window-bounds as internal display.
117// This is for debugging on linux desktop.
118const char kAshUseFirstDisplayAsInternal[] =
119 "ash-use-first-display-as-internal";
120
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000121// (Most) Chrome OS hardware reports ACPI power button releases correctly.
122// Standard hardware reports releases immediately after presses. If set, we
123// lock the screen or shutdown the system immediately in response to a press
124// instead of displaying an interactive animation.
125const char kAuraLegacyPowerButton[] = "aura-legacy-power-button";
126
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000127#if defined(OS_WIN)
128// Force Ash to open its root window on the desktop, even on Windows 8 where
129// it would normally end up in metro.
130const char kForceAshToDesktop[] = "ash-force-desktop";
Torne (Richard Coles)b2df76e2013-05-13 16:52:09 +0100131
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000132#endif
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000133
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100134bool UseAlternateFrameCaptionButtonStyle() {
Torne (Richard Coles)a1401312014-03-18 10:20:56 +0000135 return !CommandLine::ForCurrentProcess()->
136 HasSwitch(kAshDisableAlternateFrameCaptionButtonStyle);
Torne (Richard Coles)58537e22013-09-12 12:10:22 +0100137}
138
139bool UseAlternateShelfLayout() {
140 return !CommandLine::ForCurrentProcess()->
141 HasSwitch(kAshDisableAlternateShelfLayout);
Torne (Richard Coles)3551c9c2013-08-23 16:39:15 +0100142}
143
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000144bool UseDockedWindows() {
145 return !CommandLine::ForCurrentProcess()->HasSwitch(kAshDisableDockedWindows);
146}
147
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000148} // namespace switches
149} // namespace ash