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

Side by Side Diff: content/browser/renderer_host/input/synthetic_smooth_move_gesture.h

Issue 2742473002: gpu benchmarking swipe for touchpad
Patch Set: Update direction in tests that use swipeElement/Page to maintain the same behavior. Created 3 years, 8 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
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 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_MOVE_GESTURE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_MOVE_GESTURE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_MOVE_GESTURE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_MOVE_GESTURE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 15 matching lines...) Expand all
26 SyntheticSmoothMoveGestureParams(); 26 SyntheticSmoothMoveGestureParams();
27 SyntheticSmoothMoveGestureParams( 27 SyntheticSmoothMoveGestureParams(
28 const SyntheticSmoothMoveGestureParams& other); 28 const SyntheticSmoothMoveGestureParams& other);
29 ~SyntheticSmoothMoveGestureParams(); 29 ~SyntheticSmoothMoveGestureParams();
30 30
31 enum InputType { MOUSE_DRAG_INPUT, MOUSE_WHEEL_INPUT, TOUCH_INPUT }; 31 enum InputType { MOUSE_DRAG_INPUT, MOUSE_WHEEL_INPUT, TOUCH_INPUT };
32 32
33 InputType input_type; 33 InputType input_type;
34 gfx::PointF start_point; 34 gfx::PointF start_point;
35 std::vector<gfx::Vector2dF> distances; 35 std::vector<gfx::Vector2dF> distances;
36 gfx::Vector2dF velocity;
36 int speed_in_pixels_s; 37 int speed_in_pixels_s;
37 bool prevent_fling; 38 bool prevent_fling;
38 bool add_slop; 39 bool add_slop;
39 }; 40 };
40 41
41 // This class is used as helper class for simulation of scroll and drag. 42 // This class is used as helper class for simulation of scroll and drag.
42 // Simulates scrolling/dragging given a sequence of distances as a continuous 43 // Simulates scrolling/dragging given a sequence of distances as a continuous
43 // gestures (i.e. when synthesizing touch or mouse drag events, the pointer is 44 // gestures (i.e. when synthesizing touch or mouse drag events, the pointer is
44 // not lifted when changing scroll direction). 45 // not lifted when changing scroll direction).
45 // If no distance is provided or the first one is 0, no touch events are 46 // If no distance is provided or the first one is 0, no touch events are
(...skipping 22 matching lines...) Expand all
68 void ForwardTouchInputEvents( 69 void ForwardTouchInputEvents(
69 const base::TimeTicks& timestamp, SyntheticGestureTarget* target); 70 const base::TimeTicks& timestamp, SyntheticGestureTarget* target);
70 void ForwardMouseWheelInputEvents( 71 void ForwardMouseWheelInputEvents(
71 const base::TimeTicks& timestamp, SyntheticGestureTarget* target); 72 const base::TimeTicks& timestamp, SyntheticGestureTarget* target);
72 void ForwardMouseClickInputEvents( 73 void ForwardMouseClickInputEvents(
73 const base::TimeTicks& timestamp, SyntheticGestureTarget* target); 74 const base::TimeTicks& timestamp, SyntheticGestureTarget* target);
74 75
75 void ForwardMouseWheelEvent(SyntheticGestureTarget* target, 76 void ForwardMouseWheelEvent(SyntheticGestureTarget* target,
76 const gfx::Vector2dF& delta, 77 const gfx::Vector2dF& delta,
77 const base::TimeTicks& timestamp) const; 78 const base::TimeTicks& timestamp) const;
79 void ForwardTouchpadFlingEvent(SyntheticGestureTarget* target,
80 const gfx::Vector2dF& velocity,
81 const base::TimeTicks& timestamp) const;
78 82
79 void PressPoint(SyntheticGestureTarget* target, 83 void PressPoint(SyntheticGestureTarget* target,
80 const base::TimeTicks& timestamp); 84 const base::TimeTicks& timestamp);
81 void MovePoint(SyntheticGestureTarget* target, 85 void MovePoint(SyntheticGestureTarget* target,
82 const gfx::Vector2dF& delta, 86 const gfx::Vector2dF& delta,
83 const base::TimeTicks& timestamp); 87 const base::TimeTicks& timestamp);
84 void ReleasePoint(SyntheticGestureTarget* target, 88 void ReleasePoint(SyntheticGestureTarget* target,
85 const base::TimeTicks& timestamp); 89 const base::TimeTicks& timestamp);
86 90
87 void AddTouchSlopToFirstDistance(SyntheticGestureTarget* target); 91 void AddTouchSlopToFirstDistance(SyntheticGestureTarget* target);
(...skipping 14 matching lines...) Expand all
102 int current_move_segment_; 106 int current_move_segment_;
103 base::TimeTicks current_move_segment_start_time_; 107 base::TimeTicks current_move_segment_start_time_;
104 base::TimeTicks current_move_segment_stop_time_; 108 base::TimeTicks current_move_segment_stop_time_;
105 109
106 DISALLOW_COPY_AND_ASSIGN(SyntheticSmoothMoveGesture); 110 DISALLOW_COPY_AND_ASSIGN(SyntheticSmoothMoveGesture);
107 }; 111 };
108 112
109 } // namespace content 113 } // namespace content
110 114
111 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_MOVE_GESTURE_H_ 115 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_MOVE_GESTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698