This source file includes following definitions.
- speed_in_pixels_s
- speed_in_pixels_s
- GetGestureType
- Cast
#include "content/common/input/synthetic_smooth_scroll_gesture_params.h"
#include "base/logging.h"
namespace content {
namespace {
const int kDefaultSpeedInPixelsS = 800;
}
SyntheticSmoothScrollGestureParams::SyntheticSmoothScrollGestureParams()
: prevent_fling(true), speed_in_pixels_s(kDefaultSpeedInPixelsS) {}
SyntheticSmoothScrollGestureParams::SyntheticSmoothScrollGestureParams(
const SyntheticSmoothScrollGestureParams& other)
: SyntheticGestureParams(other),
anchor(other.anchor),
distances(other.distances),
prevent_fling(other.prevent_fling),
speed_in_pixels_s(other.speed_in_pixels_s) {}
SyntheticSmoothScrollGestureParams::~SyntheticSmoothScrollGestureParams() {}
SyntheticGestureParams::GestureType
SyntheticSmoothScrollGestureParams::GetGestureType() const {
return SMOOTH_SCROLL_GESTURE;
}
const SyntheticSmoothScrollGestureParams*
SyntheticSmoothScrollGestureParams::Cast(
const SyntheticGestureParams* gesture_params) {
DCHECK(gesture_params);
DCHECK_EQ(SMOOTH_SCROLL_GESTURE, gesture_params->GetGestureType());
return static_cast<const SyntheticSmoothScrollGestureParams*>(gesture_params);
}
}