event_switches.cc revision 5f1c94371a64b3196d4be9466099bb892df9b88e
168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// found in the LICENSE file.
468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)#include "ui/events/event_switches.h"
668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
768043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)namespace switches {
868043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
968043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Enable scroll prediction for scroll update events.
1068043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)const char kEnableScrollPrediction[] = "enable-scroll-prediction";
1168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
1268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Enable support for touch events.
1368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)const char kTouchEvents[] = "touch-events";
1468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
1568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// The values the kTouchEvents switch may have, as in --touch-events=disabled.
1668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)//   auto: enabled at startup when an attached touchscreen is present.
1768043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)const char kTouchEventsAuto[] = "auto";
1868043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)//   enabled: touch events always enabled.
1968043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)const char kTouchEventsEnabled[] = "enabled";
2068043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)//   disabled: touch events are disabled.
2168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)const char kTouchEventsDisabled[] = "disabled";
22cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
23cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Enable the unified gesture detector, instead of the aura gesture detector.
24cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)const char kUnifiedGestureDetector[] = "unified-gesture-detector";
25cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)
26cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// The values the kUnifiedGestureDetector switch may have, as in
27cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// --unified-gesture-detector=disabled.
28cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)//   auto: Same as disabled.
29cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)const char kUnifiedGestureDetectorAuto[] = "auto";
30cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)//   enabled: Use the unified gesture detector.
31cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)const char kUnifiedGestureDetectorEnabled[] = "enabled";
32cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)//   disabled: Use the aura gesture detector.
33cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)const char kUnifiedGestureDetectorDisabled[] = "disabled";
3468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
355f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// Enable compensation for unstable pinch zoom. Some touch screens display
365f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// significant amount of wobble when moving a finger in a straight line. This
375f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// makes two finger scroll trigger an oscillating pinch zoom. See
385f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// crbug.com/394380 for details.
395f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)const char kCompensateForUnstablePinchZoom[] =
405f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)    "compensate-for-unstable-pinch-zoom";
415f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)
424e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)#if defined(OS_LINUX)
4368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Tells chrome to interpret events from these devices as touch events. Only
4468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// available with XInput 2 (i.e. X server 1.8 or above). The id's of the
4568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// devices can be retrieved from 'xinput list'.
4668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)const char kTouchDevices[] = "touch-devices";
4768043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)#endif
4868043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
490529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch#if defined(USE_XI2_MT) || defined(USE_OZONE)
50effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch// The calibration factors given as "<left>,<right>,<top>,<bottom>".
51effb81e5f8246d0db0270817048dc992db66e9fbBen Murdochconst char kTouchCalibration[] = "touch-calibration";
52effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch#endif
53effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch
5468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)}  // namespace switches
55