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_pinch_gesture_params.h"
7 #include "base/logging.h"
11 SyntheticPinchGestureParams::SyntheticPinchGestureParams()
13 relative_pointer_speed_in_pixels_s(500) {}
15 SyntheticPinchGestureParams::SyntheticPinchGestureParams(
16 const SyntheticPinchGestureParams
& other
)
17 : SyntheticGestureParams(other
),
18 scale_factor(other
.scale_factor
),
20 relative_pointer_speed_in_pixels_s(
21 other
.relative_pointer_speed_in_pixels_s
) {}
23 SyntheticPinchGestureParams::~SyntheticPinchGestureParams() {}
25 SyntheticGestureParams::GestureType
26 SyntheticPinchGestureParams::GetGestureType() const {
30 const SyntheticPinchGestureParams
* SyntheticPinchGestureParams::Cast(
31 const SyntheticGestureParams
* gesture_params
) {
32 DCHECK(gesture_params
);
33 DCHECK_EQ(PINCH_GESTURE
, gesture_params
->GetGestureType());
34 return static_cast<const SyntheticPinchGestureParams
*>(gesture_params
);
37 } // namespace content