| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 #include "ui/events/event_switches.h" | 6 #include "ui/events/event_switches.h" |
| 7 | 7 |
| 8 namespace switches { | 8 namespace switches { |
| 9 | 9 |
| 10 // Enable scroll prediction for scroll update events. | 10 // Enable scroll prediction for scroll update events. |
| 11 const char kEnableScrollPrediction[] = "enable-scroll-prediction"; | 11 const char kEnableScrollPrediction[] = "enable-scroll-prediction"; |
| 12 | 12 |
| 13 // Enable support for touch events. | |
| 14 const char kTouchEvents[] = "touch-events"; | |
| 15 | |
| 16 // The values the kTouchEvents switch may have, as in --touch-events=disabled. | |
| 17 // auto: enabled at startup when an attached touchscreen is present. | |
| 18 const char kTouchEventsAuto[] = "auto"; | |
| 19 // enabled: touch events always enabled. | |
| 20 const char kTouchEventsEnabled[] = "enabled"; | |
| 21 // disabled: touch events are disabled. | |
| 22 const char kTouchEventsDisabled[] = "disabled"; | |
| 23 | |
| 24 // Enable compensation for unstable pinch zoom. Some touch screens display | 13 // Enable compensation for unstable pinch zoom. Some touch screens display |
| 25 // significant amount of wobble when moving a finger in a straight line. This | 14 // significant amount of wobble when moving a finger in a straight line. This |
| 26 // makes two finger scroll trigger an oscillating pinch zoom. See | 15 // makes two finger scroll trigger an oscillating pinch zoom. See |
| 27 // crbug.com/394380 for details. | 16 // crbug.com/394380 for details. |
| 28 const char kCompensateForUnstablePinchZoom[] = | 17 const char kCompensateForUnstablePinchZoom[] = |
| 29 "compensate-for-unstable-pinch-zoom"; | 18 "compensate-for-unstable-pinch-zoom"; |
| 30 | 19 |
| 31 #if defined(OS_LINUX) | 20 #if defined(OS_LINUX) |
| 32 // Tells chrome to interpret events from these devices as touch events. Only | 21 // Tells chrome to interpret events from these devices as touch events. Only |
| 33 // available with XInput 2 (i.e. X server 1.8 or above). The id's of the | 22 // available with XInput 2 (i.e. X server 1.8 or above). The id's of the |
| 34 // devices can be retrieved from 'xinput list'. | 23 // devices can be retrieved from 'xinput list'. |
| 35 const char kTouchDevices[] = "touch-devices"; | 24 const char kTouchDevices[] = "touch-devices"; |
| 36 #endif | 25 #endif |
| 37 | 26 |
| 38 #if defined(USE_X11) || defined(USE_OZONE) | 27 #if defined(USE_X11) || defined(USE_OZONE) |
| 39 // Tells Chrome to do additional touch noise filtering. Should only be used if | 28 // Tells Chrome to do additional touch noise filtering. Should only be used if |
| 40 // the driver level filtering is insufficient. | 29 // the driver level filtering is insufficient. |
| 41 const char kExtraTouchNoiseFiltering[] = "touch-noise-filtering"; | 30 const char kExtraTouchNoiseFiltering[] = "touch-noise-filtering"; |
| 42 | 31 |
| 43 // The calibration factors given as "<left>,<right>,<top>,<bottom>". | 32 // The calibration factors given as "<left>,<right>,<top>,<bottom>". |
| 44 const char kTouchCalibration[] = "touch-calibration"; | 33 const char kTouchCalibration[] = "touch-calibration"; |
| 45 #endif | 34 #endif |
| 46 | 35 |
| 47 } // namespace switches | 36 } // namespace switches |
| OLD | NEW |