Use a pre-target handler in RootView to open keyboard-generated context menus
[chromium-blink-merge.git] / ash / ash_switches.cc
blob7c3146f5f04ccb45ed4b108bfbc8d28825786d69
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.
5 #include "ash/ash_switches.h"
7 #include "base/command_line.h"
9 namespace ash {
10 namespace switches {
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";
20 // Constrains the pointer movement within a root window on desktop.
21 const char kAshConstrainPointerToRoot[] = "ash-constrain-pointer-to-root";
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";
29 // Enable keyboard shortcuts useful for debugging.
30 const char kAshDebugShortcuts[] = "ash-debug-shortcuts";
32 // Indicates that the wallpaper images specified by
33 // kAshDefaultWallpaper{Large,Small} are OEM-specific (i.e. they are not
34 // downloadable from Google).
35 const char kAshDefaultWallpaperIsOem[] = "ash-default-wallpaper-is-oem";
37 // Default wallpaper to use (as paths to trusted, non-user-writable JPEG files).
38 const char kAshDefaultWallpaperLarge[] = "ash-default-wallpaper-large";
39 const char kAshDefaultWallpaperSmall[] = "ash-default-wallpaper-small";
41 // Use the normal visual style for the caption buttons (minimize, maximize,
42 // restore, close).
43 const char kAshDisableAlternateFrameCaptionButtonStyle[] =
44 "ash-disable-alternate-caption-button";
46 // Disable the alternate shelf layout.
47 const char kAshDisableAlternateShelfLayout[] =
48 "ash-disable-alternate-shelf-layout";
50 // Disable ability to dock windows at the desktop edge.
51 const char kAshDisableDockedWindows[] = "ash-disable-docked-windows";
53 // Use alternate visual style for the caption buttons (minimize, maximize,
54 // restore, close). The alternate style:
55 // - Adds a dedicated button for minimize.
56 // - Removes the maximize button's help bubble.
57 const char kAshEnableAlternateFrameCaptionButtonStyle[] =
58 "ash-enable-alternate-caption-button";
60 #if defined(OS_CHROMEOS)
61 // Enables key bindings to scroll magnified screen.
62 const char kAshEnableMagnifierKeyScroller[] =
63 "ash-enable-magnifier-key-scroller";
64 #endif
66 // Enables software based mirroring.
67 const char kAshEnableSoftwareMirroring[] = "ash-enable-software-mirroring";
69 // Enables touch view testing.
70 const char kAshEnableTouchViewTesting[] = "ash-enable-touch-view-testing";
72 // When this flag is set, system sounds will be played whether the
73 // ChromeVox is enabled or not.
74 const char kAshEnableSystemSounds[] = "ash-enable-system-sounds";
76 // Enables showing the tray bubble by dragging on the shelf.
77 const char kAshEnableTrayDragging[] = "ash-enable-tray-dragging";
79 // Wallpaper to use in guest mode (as paths to trusted, non-user-writable JPEG
80 // files).
81 const char kAshGuestWallpaperLarge[] = "ash-guest-wallpaper-large";
82 const char kAshGuestWallpaperSmall[] = "ash-guest-wallpaper-small";
84 // Hides notifications that are irrelevant to Chrome OS device factory testing,
85 // such as battery level updates.
86 const char kAshHideNotificationsForFactory[] =
87 "ash-hide-notifications-for-factory";
89 // Sets a window size, optional position, and optional scale factor.
90 // "1024x768" creates a window of size 1024x768.
91 // "100+200-1024x768" positions the window at 100,200.
92 // "1024x768*2" sets the scale factor to 2 for a high DPI display.
93 const char kAshHostWindowBounds[] = "ash-host-window-bounds";
95 // Specifies the layout mode and offsets for the secondary display for
96 // testing. The format is "<t|r|b|l>,<offset>" where t=TOP, r=RIGHT,
97 // b=BOTTOM and L=LEFT. For example, 'r,-100' means the secondary display
98 // is positioned on the right with -100 offset. (above than primary)
99 const char kAshSecondaryDisplayLayout[] = "ash-secondary-display-layout";
101 // Enables the heads-up display for tracking touch points.
102 const char kAshTouchHud[] = "ash-touch-hud";
104 // Use alternate layout of the shelf for testing a new look and feel:
105 // Slightly smaller profile, only 2 states for the "bar highlight" on
106 // launcher buttons, app list icon with more visible state indication,
107 // app list icon repositionable and defaulting as 1st item in shelf,
108 // more visible state indication for background on status area.
109 // crbug's [244983, 244990, 244994, 245005, 245012]
110 const char kAshUseAlternateShelfLayout[] = "ash-use-alternate-shelf";
112 // Uses the 1st display in --ash-host-window-bounds as internal display.
113 // This is for debugging on linux desktop.
114 const char kAshUseFirstDisplayAsInternal[] =
115 "ash-use-first-display-as-internal";
117 // (Most) Chrome OS hardware reports ACPI power button releases correctly.
118 // Standard hardware reports releases immediately after presses. If set, we
119 // lock the screen or shutdown the system immediately in response to a press
120 // instead of displaying an interactive animation.
121 const char kAuraLegacyPowerButton[] = "aura-legacy-power-button";
123 #if defined(OS_WIN)
124 // Force Ash to open its root window on the desktop, even on Windows 8 where
125 // it would normally end up in metro.
126 const char kForceAshToDesktop[] = "ash-force-desktop";
128 #endif
130 bool UseAlternateFrameCaptionButtonStyle() {
131 return !CommandLine::ForCurrentProcess()->
132 HasSwitch(kAshDisableAlternateFrameCaptionButtonStyle);
135 bool UseAlternateShelfLayout() {
136 return !CommandLine::ForCurrentProcess()->
137 HasSwitch(kAshDisableAlternateShelfLayout);
140 bool UseDockedWindows() {
141 return !CommandLine::ForCurrentProcess()->HasSwitch(kAshDisableDockedWindows);
144 } // namespace switches
145 } // namespace ash