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_pinch_gesture_params.h"
6
7#include "base/logging.h"
8
9namespace content {
10
11SyntheticPinchGestureParams::SyntheticPinchGestureParams()
12    : scale_factor(1.0f),
13      relative_pointer_speed_in_pixels_s(500) {}
14
15SyntheticPinchGestureParams::SyntheticPinchGestureParams(
16    const SyntheticPinchGestureParams& other)
17    : SyntheticGestureParams(other),
18      scale_factor(other.scale_factor),
19      anchor(other.anchor),
20      relative_pointer_speed_in_pixels_s(
21          other.relative_pointer_speed_in_pixels_s) {}
22
23SyntheticPinchGestureParams::~SyntheticPinchGestureParams() {}
24
25SyntheticGestureParams::GestureType
26SyntheticPinchGestureParams::GetGestureType() const {
27  return PINCH_GESTURE;
28}
29
30const 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);
35}
36
37}  // namespace content
38