Reland https://chromiumcodereview.appspot.com/14286004 which was reverted fue
[chromium-blink-merge.git] / ui / base / ui_base_switches.cc
blob5575f27455f7229e4b5b94c8888fd8add2ea9587
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 "ui/base/ui_base_switches.h"
7 namespace switches {
9 // Disables use of DWM composition for top level windows.
10 const char kDisableDwmComposition[] = "disable-dwm-composition";
12 // Disables touch adjustment.
13 const char kDisableTouchAdjustment[] = "disable-touch-adjustment";
15 // Disables touch event based drag and drop.
16 const char kDisableTouchDragDrop[] = "disable-touch-drag-drop";
18 // Disables controls that support touch base text editing.
19 const char kDisableTouchEditing[] = "disable-touch-editing";
21 // Disables the Views textfield on Windows.
22 const char kDisableViewsTextfield[] = "disable-views-textfield";
24 // Enables support for bezel touch.
25 const char kEnableBezelTouch[] = "enable-bezel-touch";
27 // Enables the new dialog style wherever it is available.
28 const char kEnableNewDialogStyle[] = "enable-new-dialog-style";
30 // Enables touch event based drag and drop.
31 const char kEnableTouchDragDrop[] = "enable-touch-drag-drop";
33 // Enables controls that support touch base text editing.
34 const char kEnableTouchEditing[] = "enable-touch-editing";
36 // Enables the Views textfield on Windows.
37 const char kEnableViewsTextfield[] = "enable-views-textfield";
39 // Overrides the device scale factor for the browser UI and the contents.
40 const char kForceDeviceScaleFactor[] = "force-device-scale-factor";
42 // If a resource is requested at a scale factor at which it is not available
43 // or the resource is the incorrect size (based on the size of the 1x resource),
44 // generates the missing resource and applies a red mask to the generated
45 // resource. Resources for which hidpi is not supported because of software
46 // reasons will show up pixelated.
47 const char kHighlightMissingScaledResources[] =
48 "highlight-missing-scaled-resources";
50 // The language file that we want to try to open. Of the form
51 // language[-country] where language is the 2 letter code from ISO-639.
52 const char kLang[] = "lang";
54 // Load the locale resources from the given path. When running on Mac/Unix the
55 // path should point to a locale.pak file.
56 const char kLocalePak[] = "locale_pak";
58 // Disable ui::MessageBox. This is useful when running as part of scripts that
59 // do not have a user interface.
60 const char kNoMessageBox[] = "no-message-box";
62 // Enable support for touch events.
63 const char kTouchEvents[] = "touch-events";
65 // The values the kTouchEvents switch may have, as in --touch-events=disabled.
66 // auto: enabled at startup when an attached touchscreen is present.
67 const char kTouchEventsAuto[] = "auto";
68 // enabled: touch events always enabled.
69 const char kTouchEventsEnabled[] = "enabled";
70 // disabled: touch events are disabled.
71 const char kTouchEventsDisabled[] = "disabled";
73 // Enables UI changes that make it easier to use with a touchscreen.
74 // WARNING: Do not check this flag directly when deciding what UI to draw,
75 // instead you must call ui::GetDisplayLayout
76 const char kTouchOptimizedUI[] = "touch-optimized-ui";
78 // The values the kTouchOptimizedUI switch may have, as in
79 // "--touch-optimized-ui=disabled".
80 // auto: Enabled on monitors which have touchscreen support (default).
81 const char kTouchOptimizedUIAuto[] = "auto";
82 // enabled: always optimized for touch (even if no touch support).
83 const char kTouchOptimizedUIEnabled[] = "enabled";
84 // disabled: never optimized for touch.
85 const char kTouchOptimizedUIDisabled[] = "disabled";
87 #if defined(USE_XI2_MT)
88 // The calibration factors given as "<left>,<right>,<top>,<bottom>".
89 const char kTouchCalibration[] = "touch-calibration";
90 #endif
92 #if defined(OS_MACOSX)
93 // Disables support for Core Animation plugins. This is triggered when
94 // accelerated compositing is disabled. See http://crbug.com/122430 .
95 const char kDisableCoreAnimationPlugins[] =
96 "disable-core-animation-plugins";
97 #endif
99 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
100 // Tells chrome to interpret events from these devices as touch events. Only
101 // available with XInput 2 (i.e. X server 1.8 or above). The id's of the
102 // devices can be retrieved from 'xinput list'.
103 const char kTouchDevices[] = "touch-devices";
104 #endif
106 } // namespace switches