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

Side by Side Diff: sky/engine/platform/scroll/ProgrammaticScrollAnimator.h

Issue 720713003: Remove WebScroll* (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 ProgrammaticScrollAnimator_h
6 #define ProgrammaticScrollAnimator_h
7
8 #include "platform/geometry/FloatPoint.h"
9 #include "wtf/FastAllocBase.h"
10 #include "wtf/Noncopyable.h"
11 #include "wtf/OwnPtr.h"
12 #include "wtf/PassOwnPtr.h"
13
14 namespace blink {
15
16 class ScrollableArea;
17 class WebScrollOffsetAnimationCurve;
18
19 // Animator for fixed-destination scrolls, such as those triggered by
20 // CSSOM View scroll APIs.
21 class ProgrammaticScrollAnimator {
22 WTF_MAKE_NONCOPYABLE(ProgrammaticScrollAnimator);
23 WTF_MAKE_FAST_ALLOCATED;
24 public:
25 static PassOwnPtr<ProgrammaticScrollAnimator> create(ScrollableArea*);
26
27 ~ProgrammaticScrollAnimator();
28
29 void animateToOffset(FloatPoint);
30 void cancelAnimation();
31 void tickAnimation(double monotonicTime);
32
33 private:
34 explicit ProgrammaticScrollAnimator(ScrollableArea*);
35
36 void resetAnimationState();
37
38 ScrollableArea* m_scrollableArea;
39 OwnPtr<WebScrollOffsetAnimationCurve> m_animationCurve;
40 FloatPoint m_targetOffset;
41 double m_startTime;
42 };
43
44 } // namespace blink
45
46 #endif // ProgrammaticScrollAnimator_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698