• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
SyntheticTapGestureParams()11 SyntheticTapGestureParams::SyntheticTapGestureParams() : duration_ms(0) {}
12 
SyntheticTapGestureParams(const SyntheticTapGestureParams & other)13 SyntheticTapGestureParams::SyntheticTapGestureParams(
14     const SyntheticTapGestureParams& other)
15     : SyntheticGestureParams(other),
16       position(other.position),
17       duration_ms(other.duration_ms) {}
18 
~SyntheticTapGestureParams()19 SyntheticTapGestureParams::~SyntheticTapGestureParams() {}
20 
GetGestureType() const21 SyntheticGestureParams::GestureType SyntheticTapGestureParams::GetGestureType()
22     const {
23   return TAP_GESTURE;
24 }
25 
Cast(const SyntheticGestureParams * gesture_params)26 const SyntheticTapGestureParams* SyntheticTapGestureParams::Cast(
27     const SyntheticGestureParams* gesture_params) {
28   DCHECK(gesture_params);
29   DCHECK_EQ(TAP_GESTURE, gesture_params->GetGestureType());
30   return static_cast<const SyntheticTapGestureParams*>(gesture_params);
31 }
32 
33 }  // namespace content
34