| 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_PINCH_GESTURE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_PINCH_GESTURE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_PINCH_GESTURE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_PINCH_GESTURE_H_ |
| 7 | 7 |
| 8 #include "content/browser/renderer_host/input/synthetic_gesture_new.h" | 8 #include "content/browser/renderer_host/input/synthetic_gesture.h" |
| 9 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" | 9 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
| 10 #include "content/browser/renderer_host/input/synthetic_web_input_event_builders
.h" | 10 #include "content/browser/renderer_host/input/synthetic_web_input_event_builders
.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/common/input/synthetic_pinch_gesture_params.h" | 12 #include "content/common/input/synthetic_pinch_gesture_params.h" |
| 13 #include "third_party/WebKit/public/web/WebInputEvent.h" | 13 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 class CONTENT_EXPORT SyntheticPinchGestureNew : public SyntheticGestureNew { | 17 class CONTENT_EXPORT SyntheticPinchGesture : public SyntheticGesture { |
| 18 public: | 18 public: |
| 19 explicit SyntheticPinchGestureNew(const SyntheticPinchGestureParams& params); | 19 explicit SyntheticPinchGesture(const SyntheticPinchGestureParams& params); |
| 20 virtual ~SyntheticPinchGestureNew(); | 20 virtual ~SyntheticPinchGesture(); |
| 21 | 21 |
| 22 virtual Result ForwardInputEvents(const base::TimeDelta& interval, | 22 virtual SyntheticGesture::Result ForwardInputEvents( |
| 23 SyntheticGestureTarget* target) OVERRIDE; | 23 const base::TimeDelta& interval, SyntheticGestureTarget* target) OVERRIDE; |
| 24 | 24 |
| 25 private: | 25 private: |
| 26 SyntheticPinchGestureParams params_; | 26 SyntheticPinchGestureParams params_; |
| 27 float current_y_0_; | 27 float current_y_0_; |
| 28 float current_y_1_; | 28 float current_y_1_; |
| 29 float target_y_0_; | 29 float target_y_0_; |
| 30 float target_y_1_; | 30 float target_y_1_; |
| 31 bool started_; | 31 bool started_; |
| 32 SyntheticWebTouchEvent touch_event_; | 32 SyntheticWebTouchEvent touch_event_; |
| 33 | 33 |
| 34 SyntheticGestureNew::Result ForwardTouchInputEvents( | 34 SyntheticGesture::Result ForwardTouchInputEvents( |
| 35 const base::TimeDelta& interval, SyntheticGestureTarget* target); | 35 const base::TimeDelta& interval, SyntheticGestureTarget* target); |
| 36 | 36 |
| 37 void ForwardTouchEvent(SyntheticGestureTarget* target); | 37 void ForwardTouchEvent(SyntheticGestureTarget* target); |
| 38 | 38 |
| 39 float GetPositionDelta(const base::TimeDelta& interval); | 39 float GetPositionDelta(const base::TimeDelta& interval); |
| 40 | 40 |
| 41 bool HasFinished(); | 41 bool HasFinished(); |
| 42 | 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(SyntheticPinchGestureNew); | 43 DISALLOW_COPY_AND_ASSIGN(SyntheticPinchGesture); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace content | 46 } // namespace content |
| 47 | 47 |
| 48 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_PINCH_GESTURE_H_ | 48 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_PINCH_GESTURE_H_ |
| OLD | NEW |