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

Side by Side Diff: ui/events/fling_curve.h

Issue 436213002: athena: Add support for fling-scroll in overview mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/events/events.gyp ('k') | ui/events/fling_curve.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« no previous file with comments | « ui/events/events.gyp ('k') | ui/events/fling_curve.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698