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