OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_pointer_action_params.h" |
| 6 |
| 7 namespace content { |
| 8 |
| 9 // Set the default tap duration to 50ms to lie within the bounds of the Aura |
| 10 // gesture recognizer for identifying clicks (currently 0.01s-0.80s). |
| 11 SyntheticPointerActionParams::SyntheticPointerActionParams() {} |
| 12 |
| 13 SyntheticPointerActionParams::SyntheticPointerActionParams( |
| 14 const SyntheticPointerActionParams& other) |
| 15 : SyntheticGestureParams(other), |
| 16 position(other.position), |
| 17 index(other.index), |
| 18 duration_ms(other.duration_ms), |
| 19 pointer_action_type(other.pointer_action_type) {} |
| 20 |
| 21 SyntheticPointerActionParams::~SyntheticPointerActionParams() {} |
| 22 |
| 23 SyntheticGestureParams::GestureType |
| 24 SyntheticPointerActionParams::GetGestureType() const { |
| 25 return POINTER_ACTION; |
| 26 } |
| 27 |
| 28 const SyntheticPointerActionParams* SyntheticPointerActionParams::Cast( |
| 29 const SyntheticGestureParams* gesture_params) { |
| 30 DCHECK(gesture_params); |
| 31 DCHECK_EQ(POINTER_ACTION, gesture_params->GetGestureType()); |
| 32 return static_cast<const SyntheticPointerActionParams*>(gesture_params); |
| 33 } |
| 34 |
| 35 } // namespace content |
OLD | NEW |