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

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 few comments. Created 5 years, 10 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
11 SyntheticSmoothDragGestureParams::SyntheticSmoothDragGestureParams() {
Sami 2015/02/23 18:03:28 Please initialize speed_in_pixels_s here. (Scroll
ssid 2015/02/23 19:10:36 Done. Scroll already does this. made this similar.
12 }
13
14 SyntheticSmoothDragGestureParams::SyntheticSmoothDragGestureParams(
15 const SyntheticSmoothDragGestureParams& other)
16 : SyntheticGestureParams(other),
17 start_point(other.start_point),
18 distances(other.distances),
19 speed_in_pixels_s(other.speed_in_pixels_s) {
20 }
21
22 SyntheticSmoothDragGestureParams::~SyntheticSmoothDragGestureParams() {
23 }
24
25 SyntheticGestureParams::GestureType
26 SyntheticSmoothDragGestureParams::GetGestureType() const {
27 return SMOOTH_DRAG_GESTURE;
28 }
29
30 const SyntheticSmoothDragGestureParams* SyntheticSmoothDragGestureParams::Cast(
31 const SyntheticGestureParams* gesture_params) {
32 DCHECK(gesture_params);
33 DCHECK_EQ(SMOOTH_DRAG_GESTURE, gesture_params->GetGestureType());
34 return static_cast<const SyntheticSmoothDragGestureParams*>(gesture_params);
35 }
36
37 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698