| 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 PageAnimator_h | 5 #ifndef PageAnimator_h |
| 6 #define PageAnimator_h | 6 #define PageAnimator_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/animation/AnimationClock.h" |
| 9 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 10 | 11 |
| 11 namespace blink { | 12 namespace blink { |
| 12 | 13 |
| 13 class LocalFrame; | 14 class LocalFrame; |
| 14 class Page; | 15 class Page; |
| 15 | 16 |
| 16 class CORE_EXPORT PageAnimator final : public RefCountedWillBeGarbageCollected<P
ageAnimator> { | 17 class CORE_EXPORT PageAnimator final : public RefCountedWillBeGarbageCollected<P
ageAnimator> { |
| 17 public: | 18 public: |
| 18 static PassRefPtrWillBeRawPtr<PageAnimator> create(Page&); | 19 static PassRefPtrWillBeRawPtr<PageAnimator> create(Page&); |
| 19 DECLARE_TRACE(); | 20 DECLARE_TRACE(); |
| 20 void scheduleVisualUpdate(LocalFrame* = 0); | 21 void scheduleVisualUpdate(LocalFrame* = 0); |
| 21 void serviceScriptedAnimations(double monotonicAnimationStartTime); | 22 void serviceScriptedAnimations(double monotonicAnimationStartTime); |
| 22 | 23 |
| 23 bool isServicingAnimations() const { return m_servicingAnimations; } | 24 bool isServicingAnimations() const { return m_servicingAnimations; } |
| 24 void updateLayoutAndStyleForPainting(LocalFrame& rootFrame); | 25 void updateLayoutAndStyleForPainting(LocalFrame& rootFrame); |
| 25 void updateAllLifecyclePhases(LocalFrame& rootFrame); | 26 void updateAllLifecyclePhases(LocalFrame& rootFrame); |
| 27 AnimationClock& clock() { return m_animationClock; } |
| 26 | 28 |
| 27 private: | 29 private: |
| 28 explicit PageAnimator(Page&); | 30 explicit PageAnimator(Page&); |
| 29 | 31 |
| 30 RawPtrWillBeMember<Page> m_page; | 32 RawPtrWillBeMember<Page> m_page; |
| 31 bool m_servicingAnimations; | 33 bool m_servicingAnimations; |
| 32 bool m_updatingLayoutAndStyleForPainting; | 34 bool m_updatingLayoutAndStyleForPainting; |
| 35 AnimationClock m_animationClock; |
| 33 }; | 36 }; |
| 34 | 37 |
| 35 } | 38 } |
| 36 | 39 |
| 37 #endif // PageAnimator_h | 40 #endif // PageAnimator_h |
| OLD | NEW |