Chromium Code Reviews| Index: content/common/input/synthetic_pointer_action_params.cc |
| diff --git a/content/common/input/synthetic_pointer_action_params.cc b/content/common/input/synthetic_pointer_action_params.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..205714acdfed68098ccaef31c0fb18658c3cda6d |
| --- /dev/null |
| +++ b/content/common/input/synthetic_pointer_action_params.cc |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "content/common/input/synthetic_pointer_action_params.h" |
| + |
| +#include "base/logging.h" |
| + |
| +namespace content { |
| + |
| +// Set the default tap duration to 50ms to lie within the bounds of the Aura |
| +// gesture recognizer for identifying clicks (currently 0.01s-0.80s). |
|
tdresser
2016/02/29 15:06:56
Is isn't clear what code this comment is referring
lanwei
2016/03/07 05:41:58
Done.
|
| +SyntheticPointerActionParams::SyntheticPointerActionParams() {} |
| + |
| +SyntheticPointerActionParams::SyntheticPointerActionParams( |
| + const SyntheticPointerActionParams& other) |
| + : SyntheticGestureParams(other), |
| + index(other.index), |
| + position(other.position), |
| + pointer_action_type(other.pointer_action_type), |
| + process(other.process) {} |
| + |
| +SyntheticPointerActionParams::~SyntheticPointerActionParams() {} |
| + |
| +SyntheticGestureParams::GestureType |
| +SyntheticPointerActionParams::GetGestureType() const { |
| + return POINTER_ACTION; |
| +} |
| + |
| +const SyntheticPointerActionParams* SyntheticPointerActionParams::Cast( |
| + const SyntheticGestureParams* gesture_params) { |
| + DCHECK(gesture_params); |
| + DCHECK_EQ(POINTER_ACTION, gesture_params->GetGestureType()); |
| + return static_cast<const SyntheticPointerActionParams*>(gesture_params); |
| +} |
| + |
| +} // namespace content |