Enable gesture editing visibile in options menu.
[chromium-blink-merge.git] / content / common / input / synthetic_smooth_drag_gesture_params.cc
blobf5adc46a5a8730a9f221cab54e7cff5208a1239e
1 // Copyright 2015 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_smooth_drag_gesture_params.h"
7 #include "base/logging.h"
9 namespace content {
10 namespace {
12 const float kDefaultSpeedInPixelsPerSec = 800;
14 } // namespace
16 SyntheticSmoothDragGestureParams::SyntheticSmoothDragGestureParams()
17 : speed_in_pixels_s(kDefaultSpeedInPixelsPerSec) {
20 SyntheticSmoothDragGestureParams::SyntheticSmoothDragGestureParams(
21 const SyntheticSmoothDragGestureParams& other)
22 : SyntheticGestureParams(other),
23 start_point(other.start_point),
24 distances(other.distances),
25 speed_in_pixels_s(other.speed_in_pixels_s) {
28 SyntheticSmoothDragGestureParams::~SyntheticSmoothDragGestureParams() {
31 SyntheticGestureParams::GestureType
32 SyntheticSmoothDragGestureParams::GetGestureType() const {
33 return SMOOTH_DRAG_GESTURE;
36 const SyntheticSmoothDragGestureParams* SyntheticSmoothDragGestureParams::Cast(
37 const SyntheticGestureParams* gesture_params) {
38 DCHECK(gesture_params);
39 DCHECK_EQ(SMOOTH_DRAG_GESTURE, gesture_params->GetGestureType());
40 return static_cast<const SyntheticSmoothDragGestureParams*>(gesture_params);
43 } // namespace content