Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: content/common/input/synthetic_smooth_drag_gesture_params.cc

Issue 929333002: Adding synthetic touch/mouse drag [Part1] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "content/common/input/synthetic_smooth_drag_gesture_params.h"
6
7 #include "base/logging.h"
8
9 namespace content {
10 namespace {
11
12 const int kDefaultSpeedInPixelsPerSec = 800;
13
14 } // namespace
15
16 SyntheticSmoothDragGestureParams::SyntheticSmoothDragGestureParams()
17 : speed_in_pixels_s(kDefaultSpeedInPixelsPerSec) {
18 }
19
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) {
26 }
27
28 SyntheticSmoothDragGestureParams::~SyntheticSmoothDragGestureParams() {
29 }
30
31 SyntheticGestureParams::GestureType
32 SyntheticSmoothDragGestureParams::GetGestureType() const {
33 return SMOOTH_DRAG_GESTURE;
34 }
35
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);
41 }
42
43 } // namespace content
OLDNEW
« no previous file with comments | « content/common/input/synthetic_smooth_drag_gesture_params.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698