OLD | NEW |
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_SCROLL_GESTURE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_SCROLL_GESTURE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_SCROLL_GESTURE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_SCROLL_GESTURE_H_ |
7 | 7 |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "content/browser/renderer_host/input/synthetic_gesture.h" | 9 #include "content/browser/renderer_host/input/synthetic_gesture.h" |
10 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" | 10 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 const base::TimeDelta& interval, SyntheticGestureTarget* target) OVERRIDE; | 25 const base::TimeDelta& interval, SyntheticGestureTarget* target) OVERRIDE; |
26 | 26 |
27 private: | 27 private: |
28 enum GestureState { | 28 enum GestureState { |
29 SETUP, | 29 SETUP, |
30 STARTED, | 30 STARTED, |
31 MOVING, | 31 MOVING, |
32 STOPPING, | 32 STOPPING, |
33 DONE | 33 DONE |
34 }; | 34 }; |
35 SyntheticSmoothScrollGestureParams params_; | |
36 float current_y_; | |
37 SyntheticWebTouchEvent touch_event_; | |
38 SyntheticGestureParams::GestureSourceType gesture_source_type_; | |
39 GestureState state_; | |
40 base::TimeDelta total_stopping_wait_time_; | |
41 | 35 |
42 void ForwardTouchInputEvents( | 36 void ForwardTouchInputEvents( |
43 const base::TimeDelta& interval, SyntheticGestureTarget* target); | 37 const base::TimeDelta& interval, SyntheticGestureTarget* target); |
44 void ForwardMouseInputEvents( | 38 void ForwardMouseInputEvents( |
45 const base::TimeDelta& interval, SyntheticGestureTarget* target); | 39 const base::TimeDelta& interval, SyntheticGestureTarget* target); |
46 | 40 |
47 void ForwardTouchEvent(SyntheticGestureTarget* target) const; | 41 void ForwardTouchEvent(SyntheticGestureTarget* target) const; |
48 void ForwardMouseWheelEvent(SyntheticGestureTarget* target, | 42 void ForwardMouseWheelEvent(SyntheticGestureTarget* target, |
49 float delta) const; | 43 float delta) const; |
50 | 44 |
51 float GetPositionDelta(const base::TimeDelta& interval) const; | 45 float GetPositionDelta(const base::TimeDelta& interval) const; |
52 float ComputeAbsoluteRemainingDistance() const; | 46 float ComputeAbsoluteRemainingDistance() const; |
53 bool HasScrolledEntireDistance() const; | 47 bool HasScrolledEntireDistance() const; |
54 | 48 |
| 49 SyntheticSmoothScrollGestureParams params_; |
| 50 float current_y_; |
| 51 SyntheticWebTouchEvent touch_event_; |
| 52 SyntheticGestureParams::GestureSourceType gesture_source_type_; |
| 53 GestureState state_; |
| 54 base::TimeDelta total_stopping_wait_time_; |
| 55 |
55 DISALLOW_COPY_AND_ASSIGN(SyntheticSmoothScrollGesture); | 56 DISALLOW_COPY_AND_ASSIGN(SyntheticSmoothScrollGesture); |
56 }; | 57 }; |
57 | 58 |
58 } // namespace content | 59 } // namespace content |
59 | 60 |
60 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_SCROLL_GESTURE_H
_ | 61 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_SCROLL_GESTURE_H
_ |
OLD | NEW |