Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_EVENTS_FLING_CURVE_H_ | |
|
sky
2014/08/05 17:53:36
As this is gesture related would it make sense to
sadrul
2014/08/05 18:09:06
Yep. Done.
| |
| 6 #define UI_EVENTS_FLING_CURVE_H_ | |
| 7 | |
| 8 #include "base/time/time.h" | |
| 9 #include "ui/events/events_base_export.h" | |
| 10 #include "ui/gfx/geometry/point_f.h" | |
| 11 #include "ui/gfx/geometry/vector2d_f.h" | |
| 12 | |
| 13 namespace ui { | |
| 14 | |
| 15 class EVENTS_BASE_EXPORT FlingCurve { | |
|
sky
2014/08/05 17:53:36
Add a description.
sadrul
2014/08/05 18:09:06
Done.
| |
| 16 public: | |
| 17 FlingCurve(const gfx::Vector2dF& velocity, base::TimeTicks start_timestamp); | |
| 18 ~FlingCurve(); | |
| 19 | |
| 20 gfx::Vector2dF GetScrollAmountAtTime(base::TimeTicks current_timestamp); | |
| 21 base::TimeTicks creation_time() const { return start_timestamp_; } | |
|
sky
2014/08/05 17:53:37
nit: style guide says getter and field should matc
sadrul
2014/08/05 18:09:06
Done (changed to start_timestamp()).
| |
| 22 | |
| 23 private: | |
| 24 const float curve_duration_; | |
| 25 | |
| 26 gfx::Vector2dF displacement_ratio_; | |
| 27 gfx::Vector2dF cumulative_scroll_; | |
| 28 base::TimeTicks start_timestamp_; | |
|
sky
2014/08/05 17:53:37
const?
sadrul
2014/08/05 18:09:06
Done.
| |
| 29 base::TimeTicks last_timestamp_; | |
| 30 float time_offset_; | |
| 31 float position_offset_; | |
| 32 | |
| 33 DISALLOW_COPY_AND_ASSIGN(FlingCurve); | |
| 34 }; | |
| 35 | |
| 36 } // namespace ui | |
| 37 | |
| 38 #endif // UI_EVENTS_FLING_CURVE_H_ | |
| OLD | NEW |