| 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_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" |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "content/browser/renderer_host/input/synthetic_gesture.h" | 12 #include "content/browser/renderer_host/input/synthetic_gesture.h" |
| 13 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" | 13 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
| 14 #include "content/browser/renderer_host/input/synthetic_pointer.h" | 14 #include "content/browser/renderer_host/input/synthetic_pointer_driver.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "content/common/input/synthetic_smooth_drag_gesture_params.h" | 16 #include "content/common/input/synthetic_smooth_drag_gesture_params.h" |
| 17 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 17 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
| 18 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 18 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 19 #include "ui/gfx/geometry/vector2d.h" | 19 #include "ui/gfx/geometry/vector2d.h" |
| 20 #include "ui/gfx/geometry/vector2d_f.h" | 20 #include "ui/gfx/geometry/vector2d_f.h" |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 | 23 |
| 24 class CONTENT_EXPORT SyntheticSmoothMoveGestureParams { | 24 class CONTENT_EXPORT SyntheticSmoothMoveGestureParams { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 void AddTouchSlopToFirstDistance(SyntheticGestureTarget* target); | 87 void AddTouchSlopToFirstDistance(SyntheticGestureTarget* target); |
| 88 gfx::Vector2dF GetPositionDeltaAtTime(const base::TimeTicks& timestamp) const; | 88 gfx::Vector2dF GetPositionDeltaAtTime(const base::TimeTicks& timestamp) const; |
| 89 void ComputeNextMoveSegment(); | 89 void ComputeNextMoveSegment(); |
| 90 base::TimeTicks ClampTimestamp(const base::TimeTicks& timestamp) const; | 90 base::TimeTicks ClampTimestamp(const base::TimeTicks& timestamp) const; |
| 91 bool FinishedCurrentMoveSegment(const base::TimeTicks& timestamp) const; | 91 bool FinishedCurrentMoveSegment(const base::TimeTicks& timestamp) const; |
| 92 bool IsLastMoveSegment() const; | 92 bool IsLastMoveSegment() const; |
| 93 bool MoveIsNoOp() const; | 93 bool MoveIsNoOp() const; |
| 94 | 94 |
| 95 SyntheticSmoothMoveGestureParams params_; | 95 SyntheticSmoothMoveGestureParams params_; |
| 96 std::unique_ptr<SyntheticPointer> synthetic_pointer_; | 96 std::unique_ptr<SyntheticPointerDriver> synthetic_pointer_driver_; |
| 97 // Used for mouse input. | 97 // Used for mouse input. |
| 98 gfx::Vector2d current_move_segment_total_delta_discrete_; | 98 gfx::Vector2d current_move_segment_total_delta_discrete_; |
| 99 // Used for touch input. | 99 // Used for touch input. |
| 100 gfx::PointF current_move_segment_start_position_; | 100 gfx::PointF current_move_segment_start_position_; |
| 101 GestureState state_; | 101 GestureState state_; |
| 102 int current_move_segment_; | 102 int current_move_segment_; |
| 103 base::TimeTicks current_move_segment_start_time_; | 103 base::TimeTicks current_move_segment_start_time_; |
| 104 base::TimeTicks current_move_segment_stop_time_; | 104 base::TimeTicks current_move_segment_stop_time_; |
| 105 | 105 |
| 106 DISALLOW_COPY_AND_ASSIGN(SyntheticSmoothMoveGesture); | 106 DISALLOW_COPY_AND_ASSIGN(SyntheticSmoothMoveGesture); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } // namespace content | 109 } // namespace content |
| 110 | 110 |
| 111 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_MOVE_GESTURE_H_ | 111 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_SMOOTH_MOVE_GESTURE_H_ |
| OLD | NEW |