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)
235f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// Enable compensation for unstable pinch zoom. Some touch screens display
245f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// significant amount of wobble when moving a finger in a straight line. This
255f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// makes two finger scroll trigger an oscillating pinch zoom. See
265f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)// crbug.com/394380 for details.
275f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)const char kCompensateForUnstablePinchZoom[] =
285f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)    "compensate-for-unstable-pinch-zoom";
295f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)
304e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)#if defined(OS_LINUX)
3168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Tells chrome to interpret events from these devices as touch events. Only
3268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// available with XInput 2 (i.e. X server 1.8 or above). The id's of the
3368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// devices can be retrieved from 'xinput list'.
3468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)const char kTouchDevices[] = "touch-devices";
3568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)#endif
3668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
370529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch#if defined(USE_XI2_MT) || defined(USE_OZONE)
38effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch// The calibration factors given as "<left>,<right>,<top>,<bottom>".
39effb81e5f8246d0db0270817048dc992db66e9fbBen Murdochconst char kTouchCalibration[] = "touch-calibration";
40effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch#endif
41effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch
4268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)}  // namespace switches
43