| 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 "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class LocalFrame; | 12 class LocalFrame; |
| 13 class Page; | 13 class Page; |
| 14 | 14 |
| 15 class PageAnimator final : public RefCountedWillBeGarbageCollected<PageAnimator>
{ | 15 class PageAnimator final : public RefCountedWillBeGarbageCollected<PageAnimator>
{ |
| 16 public: | 16 public: |
| 17 static PassRefPtrWillBeRawPtr<PageAnimator> create(Page&); | 17 static PassRefPtrWillBeRawPtr<PageAnimator> create(Page&); |
| 18 void trace(Visitor*); | 18 void trace(Visitor*); |
| 19 void scheduleVisualUpdate(); | 19 void scheduleVisualUpdate(LocalFrame* rootFrame = 0); |
| 20 void serviceScriptedAnimations(double monotonicAnimationStartTime); | 20 void serviceScriptedAnimations(double monotonicAnimationStartTime); |
| 21 | 21 |
| 22 void setAnimationFramePending() { m_animationFramePending = true; } | 22 void setAnimationFramePending() { m_animationFramePending = true; } |
| 23 bool isServicingAnimations() const { return m_servicingAnimations; } | 23 bool isServicingAnimations() const { return m_servicingAnimations; } |
| 24 void updateLayoutAndStyleForPainting(LocalFrame* rootFrame); | 24 void updateLayoutAndStyleForPainting(LocalFrame* rootFrame); |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 explicit PageAnimator(Page&); | 27 explicit PageAnimator(Page&); |
| 28 | 28 |
| 29 RawPtrWillBeMember<Page> m_page; | 29 RawPtrWillBeMember<Page> m_page; |
| 30 bool m_animationFramePending; | 30 bool m_animationFramePending; |
| 31 bool m_servicingAnimations; | 31 bool m_servicingAnimations; |
| 32 bool m_updatingLayoutAndStyleForPainting; | 32 bool m_updatingLayoutAndStyleForPainting; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } | 35 } |
| 36 | 36 |
| 37 #endif // PageAnimator_h | 37 #endif // PageAnimator_h |
| OLD | NEW |