| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ProgrammaticScrollAnimator_h | 5 #ifndef ProgrammaticScrollAnimator_h |
| 6 #define ProgrammaticScrollAnimator_h | 6 #define ProgrammaticScrollAnimator_h |
| 7 | 7 |
| 8 #include "platform/geometry/FloatPoint.h" | 8 #include "platform/geometry/FloatPoint.h" |
| 9 #include "wtf/FastAllocBase.h" | 9 #include "wtf/FastAllocBase.h" |
| 10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 WTF_MAKE_NONCOPYABLE(ProgrammaticScrollAnimator); | 22 WTF_MAKE_NONCOPYABLE(ProgrammaticScrollAnimator); |
| 23 WTF_MAKE_FAST_ALLOCATED; | 23 WTF_MAKE_FAST_ALLOCATED; |
| 24 public: | 24 public: |
| 25 static PassOwnPtr<ProgrammaticScrollAnimator> create(ScrollableArea*); | 25 static PassOwnPtr<ProgrammaticScrollAnimator> create(ScrollableArea*); |
| 26 | 26 |
| 27 ~ProgrammaticScrollAnimator(); | 27 ~ProgrammaticScrollAnimator(); |
| 28 | 28 |
| 29 void animateToOffset(FloatPoint); | 29 void animateToOffset(FloatPoint); |
| 30 void cancelAnimation(); | 30 void cancelAnimation(); |
| 31 void tickAnimation(double monotonicTime); | 31 void tickAnimation(double monotonicTime); |
| 32 bool hasRunningAnimation() const; |
| 32 | 33 |
| 33 private: | 34 private: |
| 34 explicit ProgrammaticScrollAnimator(ScrollableArea*); | 35 explicit ProgrammaticScrollAnimator(ScrollableArea*); |
| 35 | 36 |
| 36 void resetAnimationState(); | 37 void resetAnimationState(); |
| 37 | 38 |
| 38 ScrollableArea* m_scrollableArea; | 39 ScrollableArea* m_scrollableArea; |
| 39 OwnPtr<WebScrollOffsetAnimationCurve> m_animationCurve; | 40 OwnPtr<WebScrollOffsetAnimationCurve> m_animationCurve; |
| 40 FloatPoint m_targetOffset; | 41 FloatPoint m_targetOffset; |
| 41 double m_startTime; | 42 double m_startTime; |
| 42 }; | 43 }; |
| 43 | 44 |
| 44 } // namespace blink | 45 } // namespace blink |
| 45 | 46 |
| 46 #endif // ProgrammaticScrollAnimator_h | 47 #endif // ProgrammaticScrollAnimator_h |
| OLD | NEW |