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"
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
)
23 // These values should change very rarely. We thus hard-code them here rather
24 // than having to query the brower's SyntheticGestureTarget.
26 return gesture_source_type
== TOUCH_INPUT
||
27 gesture_source_type
== MOUSE_INPUT
;
28 #elif defined(OS_ANDROID)
29 // Android supports mouse wheel events, but mouse drag is not yet
30 // supported. See crbug.com/468806.
31 return gesture_source_type
== TOUCH_INPUT
||
32 gesture_source_type
== MOUSE_INPUT
;
34 return gesture_source_type
== MOUSE_INPUT
;
38 } // namespace content