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. 4 5 #include "content/common/input/synthetic_tap_gesture_params.h" 6 7 #include "base/logging.h" 8 9 namespace content { 10 11 // Set the default tap duration to 50ms to lie within the bounds of the Aura 12 // gesture recognizer for identifying clicks (currently 0.01s-0.80s). 13 SyntheticTapGestureParams::SyntheticTapGestureParams() : duration_ms(50) {} 14 15 SyntheticTapGestureParams::SyntheticTapGestureParams( 16 const SyntheticTapGestureParams& other) 17 : SyntheticGestureParams(other), 18 position(other.position), 19 duration_ms(other.duration_ms) {} 20 21 SyntheticTapGestureParams::~SyntheticTapGestureParams() {} 22 23 SyntheticGestureParams::GestureType SyntheticTapGestureParams::GetGestureType() 24 const { 25 return TAP_GESTURE; 26 } 27 28 const SyntheticTapGestureParams* SyntheticTapGestureParams::Cast( 29 const SyntheticGestureParams* gesture_params) { 30 DCHECK(gesture_params); 31 DCHECK_EQ(TAP_GESTURE, gesture_params->GetGestureType()); 32 return static_cast<const SyntheticTapGestureParams*>(gesture_params); 33 } 34 35 } // namespace content 36