Home | History | Annotate | Download | only in input
      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 
      9 namespace content {
     10 
     11 SyntheticPinchGestureParams::SyntheticPinchGestureParams()
     12     : zoom_in(true),
     13       total_num_pixels_covered(100),
     14       relative_pointer_speed_in_pixels_s(500) {}
     15 
     16 SyntheticPinchGestureParams::SyntheticPinchGestureParams(
     17     const SyntheticPinchGestureParams& other)
     18     : SyntheticGestureParams(other),
     19       zoom_in(other.zoom_in),
     20       total_num_pixels_covered(other.total_num_pixels_covered),
     21       anchor(other.anchor),
     22       relative_pointer_speed_in_pixels_s(
     23           other.relative_pointer_speed_in_pixels_s) {}
     24 
     25 SyntheticPinchGestureParams::~SyntheticPinchGestureParams() {}
     26 
     27 SyntheticGestureParams::GestureType
     28 SyntheticPinchGestureParams::GetGestureType() const {
     29   return PINCH_GESTURE;
     30 }
     31 
     32 const SyntheticPinchGestureParams* SyntheticPinchGestureParams::Cast(
     33     const SyntheticGestureParams* gesture_params) {
     34   DCHECK(gesture_params);
     35   DCHECK_EQ(PINCH_GESTURE, gesture_params->GetGestureType());
     36   return static_cast<const SyntheticPinchGestureParams*>(gesture_params);
     37 }
     38 
     39 }  // namespace content
     40