| 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_new.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" |
| 11 #include "content/browser/renderer_host/input/synthetic_web_input_event_builders
.h" | 11 #include "content/browser/renderer_host/input/synthetic_web_input_event_builders
.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 13 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
| 14 #include "third_party/WebKit/public/web/WebInputEvent.h" | 14 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 class CONTENT_EXPORT SyntheticSmoothScrollGestureNew : | 18 class CONTENT_EXPORT SyntheticSmoothScrollGesture : public SyntheticGesture { |
| 19 public SyntheticGestureNew { | |
| 20 public: | 19 public: |
| 21 explicit SyntheticSmoothScrollGestureNew( | 20 explicit SyntheticSmoothScrollGesture( |
| 22 const SyntheticSmoothScrollGestureParams& params); | 21 const SyntheticSmoothScrollGestureParams& params); |
| 23 virtual ~SyntheticSmoothScrollGestureNew(); | 22 virtual ~SyntheticSmoothScrollGesture(); |
| 24 | 23 |
| 25 virtual Result ForwardInputEvents(const base::TimeDelta& interval, | 24 virtual SyntheticGesture::Result ForwardInputEvents( |
| 26 SyntheticGestureTarget* target) OVERRIDE; | 25 const base::TimeDelta& interval, SyntheticGestureTarget* target) OVERRIDE; |
| 27 | 26 |
| 28 private: | 27 private: |
| 29 SyntheticSmoothScrollGestureParams params_; | 28 SyntheticSmoothScrollGestureParams params_; |
| 30 float current_y_; | 29 float current_y_; |
| 31 SyntheticWebTouchEvent touch_event_; | 30 SyntheticWebTouchEvent touch_event_; |
| 32 | 31 |
| 33 SyntheticGestureNew::Result ForwardTouchInputEvents( | 32 SyntheticGesture::Result ForwardTouchInputEvents( |
| 34 const base::TimeDelta& interval, SyntheticGestureTarget* target); | 33 const base::TimeDelta& interval, SyntheticGestureTarget* target); |
| 35 SyntheticGestureNew::Result ForwardMouseInputEvents( | 34 SyntheticGesture::Result ForwardMouseInputEvents( |
| 36 const base::TimeDelta& interval, SyntheticGestureTarget* target); | 35 const base::TimeDelta& interval, SyntheticGestureTarget* target); |
| 37 | 36 |
| 38 void ForwardTouchEvent(SyntheticGestureTarget* target); | 37 void ForwardTouchEvent(SyntheticGestureTarget* target); |
| 39 void ForwardMouseWheelEvent(SyntheticGestureTarget* target, | 38 void ForwardMouseWheelEvent(SyntheticGestureTarget* target, |
| 40 float delta); | 39 float delta); |
| 41 | 40 |
| 42 float GetPositionDelta(const base::TimeDelta& interval); | 41 float GetPositionDelta(const base::TimeDelta& interval); |
| 43 | 42 |
| 44 bool HasFinished(); | 43 bool HasFinished(); |
| 45 | 44 |
| 46 DISALLOW_COPY_AND_ASSIGN(SyntheticSmoothScrollGestureNew); | 45 DISALLOW_COPY_AND_ASSIGN(SyntheticSmoothScrollGesture); |
| 47 }; | 46 }; |
| 48 | 47 |
| 49 } // namespace content | 48 } // namespace content |
| 50 | 49 |
| 51 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_SCROLL_GESTURE_H
_ | 50 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_SCROLL_GESTURE_H
_ |
| OLD | NEW |