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

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

Issue 293683002: Synthetic pinch gesture take scale factor as parameter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/input/synthetic_pinch_gesture_params.h" 5 #include "content/common/input/synthetic_pinch_gesture_params.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 SyntheticPinchGestureParams::SyntheticPinchGestureParams() 11 SyntheticPinchGestureParams::SyntheticPinchGestureParams()
12 : zoom_in(true), 12 : scale_factor(1.0f),
13 total_num_pixels_covered(100),
14 relative_pointer_speed_in_pixels_s(500) {} 13 relative_pointer_speed_in_pixels_s(500) {}
15 14
16 SyntheticPinchGestureParams::SyntheticPinchGestureParams( 15 SyntheticPinchGestureParams::SyntheticPinchGestureParams(
17 const SyntheticPinchGestureParams& other) 16 const SyntheticPinchGestureParams& other)
18 : SyntheticGestureParams(other), 17 : SyntheticGestureParams(other),
19 zoom_in(other.zoom_in), 18 scale_factor(other.scale_factor),
20 total_num_pixels_covered(other.total_num_pixels_covered),
21 anchor(other.anchor), 19 anchor(other.anchor),
22 relative_pointer_speed_in_pixels_s( 20 relative_pointer_speed_in_pixels_s(
23 other.relative_pointer_speed_in_pixels_s) {} 21 other.relative_pointer_speed_in_pixels_s) {}
24 22
25 SyntheticPinchGestureParams::~SyntheticPinchGestureParams() {} 23 SyntheticPinchGestureParams::~SyntheticPinchGestureParams() {}
26 24
27 SyntheticGestureParams::GestureType 25 SyntheticGestureParams::GestureType
28 SyntheticPinchGestureParams::GetGestureType() const { 26 SyntheticPinchGestureParams::GetGestureType() const {
29 return PINCH_GESTURE; 27 return PINCH_GESTURE;
30 } 28 }
31 29
32 const SyntheticPinchGestureParams* SyntheticPinchGestureParams::Cast( 30 const SyntheticPinchGestureParams* SyntheticPinchGestureParams::Cast(
33 const SyntheticGestureParams* gesture_params) { 31 const SyntheticGestureParams* gesture_params) {
34 DCHECK(gesture_params); 32 DCHECK(gesture_params);
35 DCHECK_EQ(PINCH_GESTURE, gesture_params->GetGestureType()); 33 DCHECK_EQ(PINCH_GESTURE, gesture_params->GetGestureType());
36 return static_cast<const SyntheticPinchGestureParams*>(gesture_params); 34 return static_cast<const SyntheticPinchGestureParams*>(gesture_params);
37 } 35 }
38 36
39 } // namespace content 37 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698