Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1083)

Unified Diff: remoting/client/ui/fling_tracker.h

Issue 2888423003: [CRD iOS] Fix bugs in FlingTracker (Closed)
Patch Set: WIP Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/client/ui/fling_tracker.cc » ('j') | remoting/client/ui/fling_tracker.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0f95055c4328b9bb9cb8b0735a40b588e9979bcf 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.
nicholss 2017/05/22 20:16:59 I think the extra whitespace is not needed in chro
Yuwei 2017/05/22 21:18:25 Done. Just tried to align a little bit..
explicit FlingTracker(float time_constant);
~FlingTracker();
// Sets the position of the object and start fling. This will reset the
// existing fling.
+ // velocity is in pixel per second
nicholss 2017/05/22 20:16:59 This should be a whole sentence.
Yuwei 2017/05/22 21:18:25 Done.
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;
« no previous file with comments | « no previous file | remoting/client/ui/fling_tracker.cc » ('j') | remoting/client/ui/fling_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698