Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / common / input / synthetic_gesture_params.cc
blob6d242377adada183d76aa75e1dc9f3f5124f67ed
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
3 // found in the LICENSE file.
5 #include "content/common/input/synthetic_gesture_params.h"
7 namespace content {
9 SyntheticGestureParams::SyntheticGestureParams()
10 : gesture_source_type(DEFAULT_INPUT) {}
12 SyntheticGestureParams::SyntheticGestureParams(
13 const SyntheticGestureParams& other)
14 : gesture_source_type(other.gesture_source_type) {}
16 SyntheticGestureParams::~SyntheticGestureParams() {}
18 bool SyntheticGestureParams::IsGestureSourceTypeSupported(
19 GestureSourceType gesture_source_type) {
20 if (gesture_source_type == DEFAULT_INPUT)
21 return true;
23 // These values should change very rarely. We thus hard-code them here rather
24 // than having to query the brower's SyntheticGestureTarget.
25 #if defined(USE_AURA)
26 return gesture_source_type == TOUCH_INPUT ||
27 gesture_source_type == MOUSE_INPUT;
28 #elif defined(OS_ANDROID)
29 return gesture_source_type == TOUCH_INPUT;
30 #else
31 return gesture_source_type == MOUSE_INPUT;
32 #endif
35 } // namespace content