Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / content / common / input / synthetic_pinch_gesture_params.cc
blobb4efcb02b17161c45e4c374dba2401f293ef0807
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"
9 namespace content {
11 SyntheticPinchGestureParams::SyntheticPinchGestureParams()
12 : scale_factor(1.0f),
13 relative_pointer_speed_in_pixels_s(500) {}
15 SyntheticPinchGestureParams::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) {}
23 SyntheticPinchGestureParams::~SyntheticPinchGestureParams() {}
25 SyntheticGestureParams::GestureType
26 SyntheticPinchGestureParams::GetGestureType() const {
27 return PINCH_GESTURE;
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