Index: remoting/client/ui/fling_tracker.h |
diff --git a/remoting/client/ui/fling_tracker.h b/remoting/client/ui/fling_tracker.h |
index 8e285ce7cfc75e1440f8db566980e6b93f8f80a7..c6e95c946d91d92e2d3bdf419f008d845d3a46d4 100644 |
--- a/remoting/client/ui/fling_tracker.h |
+++ b/remoting/client/ui/fling_tracker.h |
@@ -13,13 +13,15 @@ namespace remoting { |
// liquid. |
class FlingTracker { |
public: |
- // time_constant: The larger the number the longer it takes to fling. |
+ // time_constant: The larger the number the longer it takes to fling and the |
+ // further the object can move. |
explicit FlingTracker(float time_constant); |
~FlingTracker(); |
// Sets the position of the object and start fling. This will reset the |
// existing fling. |
+ // |velocity_x| and |velocity_y| need to be in pixel per second. |
void StartFling(float velocity_x, float velocity_y); |
void StopFling(); |
@@ -36,13 +38,12 @@ class FlingTracker { |
private: |
float time_constant_; |
float initial_speed_rate_ = 0.f; |
+ float fling_duration_ = 0.f; |
float velocity_ratio_x_ = 0.f; |
float velocity_ratio_y_ = 0.f; |
float previous_position_x_ = 0.f; |
float previous_position_y_ = 0.f; |
- base::TimeTicks start_time_; |
- |
// FlingTracker is neither copyable nor movable. |
FlingTracker(const FlingTracker&) = delete; |
FlingTracker& operator=(const FlingTracker&) = delete; |