[email protected] | 7dfb6960 | 2012-02-17 00:29:01 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 3d2c6fb | 2011-07-06 22:26:45 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
[email protected] | 42ce29d | 2011-01-20 23:19:46 | [diff] [blame] | 4 | |
5 | #include "ui/base/ui_base_switches.h" | ||||
6 | |||||
7 | namespace switches { | ||||
8 | |||||
[email protected] | 6247aba | 2013-03-04 22:57:18 | [diff] [blame] | 9 | // Disables touch adjustment. |
[email protected] | 2d481774 | 2012-12-17 20:16:18 | [diff] [blame] | 10 | const char kDisableTouchAdjustment[] = "disable-touch-adjustment"; |
11 | |||||
[email protected] | 6247aba | 2013-03-04 22:57:18 | [diff] [blame] | 12 | // Disables the Views textfield on Windows. |
13 | const char kDisableViewsTextfield[] = "disable-views-textfield"; | ||||
14 | |||||
15 | // Enables support for bezel touch. | ||||
[email protected] | c5667b28 | 2012-08-31 00:32:50 | [diff] [blame] | 16 | const char kEnableBezelTouch[] = "enable-bezel-touch"; |
[email protected] | 1995d80d | 2012-08-23 02:58:47 | [diff] [blame] | 17 | |
[email protected] | 2d481774 | 2012-12-17 20:16:18 | [diff] [blame] | 18 | // Enables the new dialog style wherever it is available. |
19 | const char kEnableNewDialogStyle[] = "enable-new-dialog-style"; | ||||
20 | |||||
[email protected] | 2d481774 | 2012-12-17 20:16:18 | [diff] [blame] | 21 | const char kEnableTouchDragDrop[] = "enable-touch-drag-drop"; |
[email protected] | b9c96ff | 2012-11-26 22:24:40 | [diff] [blame] | 22 | |
[email protected] | b74323e | 2013-02-15 21:55:31 | [diff] [blame] | 23 | // Enables controls that support touch base text editing. |
24 | const char kEnableTouchEditing[] = "enable-touch-editing"; | ||||
25 | |||||
[email protected] | fc7a93c | 2012-06-08 20:25:39 | [diff] [blame] | 26 | // Enables the Views textfield on Windows. |
27 | const char kEnableViewsTextfield[] = "enable-views-textfield"; | ||||
28 | |||||
[email protected] | 6247aba | 2013-03-04 22:57:18 | [diff] [blame] | 29 | // Overrides the device scale factor for the browser UI and the contents. |
[email protected] | 4bd2020 | 2012-06-14 17:35:01 | [diff] [blame] | 30 | const char kForceDeviceScaleFactor[] = "force-device-scale-factor"; |
31 | |||||
[email protected] | a67239d | 2012-09-19 19:20:19 | [diff] [blame] | 32 | // If a resource is requested at a scale factor at which it is not available |
33 | // or the resource is the incorrect size (based on the size of the 1x resource), | ||||
34 | // generates the missing resource and applies a red mask to the generated | ||||
[email protected] | e5c641c | 2012-06-08 17:24:51 | [diff] [blame] | 35 | // resource. Resources for which hidpi is not supported because of software |
36 | // reasons will show up pixelated. | ||||
[email protected] | a67239d | 2012-09-19 19:20:19 | [diff] [blame] | 37 | const char kHighlightMissingScaledResources[] = |
38 | "highlight-missing-scaled-resources"; | ||||
[email protected] | e5c641c | 2012-06-08 17:24:51 | [diff] [blame] | 39 | |
[email protected] | 3455af4e | 2012-03-12 15:35:12 | [diff] [blame] | 40 | // The language file that we want to try to open. Of the form |
[email protected] | 42ce29d | 2011-01-20 23:19:46 | [diff] [blame] | 41 | // language[-country] where language is the 2 letter code from ISO-639. |
[email protected] | f463cd4 | 2012-05-09 16:05:15 | [diff] [blame] | 42 | const char kLang[] = "lang"; |
[email protected] | 42ce29d | 2011-01-20 23:19:46 | [diff] [blame] | 43 | |
[email protected] | 3d2c6fb | 2011-07-06 22:26:45 | [diff] [blame] | 44 | // Load the locale resources from the given path. When running on Mac/Unix the |
45 | // path should point to a locale.pak file. | ||||
[email protected] | f463cd4 | 2012-05-09 16:05:15 | [diff] [blame] | 46 | const char kLocalePak[] = "locale_pak"; |
[email protected] | 3d2c6fb | 2011-07-06 22:26:45 | [diff] [blame] | 47 | |
[email protected] | 3455af4e | 2012-03-12 15:35:12 | [diff] [blame] | 48 | // Disable ui::MessageBox. This is useful when running as part of scripts that |
49 | // do not have a user interface. | ||||
[email protected] | f463cd4 | 2012-05-09 16:05:15 | [diff] [blame] | 50 | const char kNoMessageBox[] = "no-message-box"; |
[email protected] | 3455af4e | 2012-03-12 15:35:12 | [diff] [blame] | 51 | |
[email protected] | d793253 | 2012-11-21 21:10:31 | [diff] [blame] | 52 | // Enable support for touch events. |
53 | const char kTouchEvents[] = "touch-events"; | ||||
54 | |||||
55 | // The values the kTouchEvents switch may have, as in --touch-events=disabled. | ||||
56 | // auto: enabled at startup when an attached touchscreen is present. | ||||
57 | const char kTouchEventsAuto[] = "auto"; | ||||
58 | // enabled: touch events always enabled. | ||||
59 | const char kTouchEventsEnabled[] = "enabled"; | ||||
60 | // disabled: touch events are disabled. | ||||
61 | const char kTouchEventsDisabled[] = "disabled"; | ||||
62 | |||||
[email protected] | 7dfb6960 | 2012-02-17 00:29:01 | [diff] [blame] | 63 | // Enables UI changes that make it easier to use with a touchscreen. |
[email protected] | 347a0c7 | 2012-05-14 20:28:06 | [diff] [blame] | 64 | // WARNING: Do not check this flag directly when deciding what UI to draw, |
65 | // instead you must call ui::GetDisplayLayout | ||||
[email protected] | bca8f6c | 2012-10-23 19:23:36 | [diff] [blame] | 66 | const char kTouchOptimizedUI[] = "touch-optimized-ui"; |
[email protected] | 7dfb6960 | 2012-02-17 00:29:01 | [diff] [blame] | 67 | |
[email protected] | 347a0c7 | 2012-05-14 20:28:06 | [diff] [blame] | 68 | // The values the kTouchOptimizedUI switch may have, as in |
69 | // "--touch-optimized-ui=disabled". | ||||
70 | // auto: Enabled on monitors which have touchscreen support (default). | ||||
71 | const char kTouchOptimizedUIAuto[] = "auto"; | ||||
72 | // enabled: always optimized for touch (even if no touch support). | ||||
73 | const char kTouchOptimizedUIEnabled[] = "enabled"; | ||||
74 | // disabled: never optimized for touch. | ||||
75 | const char kTouchOptimizedUIDisabled[] = "disabled"; | ||||
[email protected] | 9b75ac5 | 2012-05-07 22:44:58 | [diff] [blame] | 76 | |
[email protected] | bca8f6c | 2012-10-23 19:23:36 | [diff] [blame] | 77 | #if defined(USE_XI2_MT) |
78 | // The calibration factors given as "<left>,<right>,<top>,<bottom>". | ||||
79 | const char kTouchCalibration[] = "touch-calibration"; | ||||
80 | #endif | ||||
81 | |||||
[email protected] | dc51d1c | 2011-11-30 04:42:21 | [diff] [blame] | 82 | #if defined(OS_MACOSX) |
[email protected] | 0fb7f983 | 2013-03-19 03:06:26 | [diff] [blame] | 83 | // Disables support for Core Animation plugins. This is triggered when |
84 | // accelerated compositing is disabled. See http://crbug.com/122430 . | ||||
[email protected] | 89ac531b | 2012-06-28 05:35:16 | [diff] [blame] | 85 | const char kDisableCoreAnimationPlugins[] = |
86 | "disable-core-animation-plugins"; | ||||
[email protected] | dc51d1c | 2011-11-30 04:42:21 | [diff] [blame] | 87 | #endif |
88 | |||||
[email protected] | bcb93db | 2012-05-25 20:03:04 | [diff] [blame] | 89 | #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) |
90 | // Tells chrome to interpret events from these devices as touch events. Only | ||||
91 | // available with XInput 2 (i.e. X server 1.8 or above). The id's of the | ||||
92 | // devices can be retrieved from 'xinput list'. | ||||
93 | const char kTouchDevices[] = "touch-devices"; | ||||
94 | #endif | ||||
95 | |||||
[email protected] | 42ce29d | 2011-01-20 23:19:46 | [diff] [blame] | 96 | } // namespace switches |