Index: Source/core/animation/AnimationPlayer.h |
diff --git a/Source/core/animation/AnimationPlayer.h b/Source/core/animation/AnimationPlayer.h |
index 2d1fd6c509dfb4166b46253feeff789e2a18218c..3c6f438421813b674006a67377c2ac6f8ce726cb 100644 |
--- a/Source/core/animation/AnimationPlayer.h |
+++ b/Source/core/animation/AnimationPlayer.h |
@@ -32,6 +32,7 @@ |
#define AnimationPlayer_h |
#include "core/animation/AnimationSource.h" |
+#include "core/dom/ActiveDOMObject.h" |
#include "core/events/EventTarget.h" |
#include "wtf/RefPtr.h" |
@@ -40,12 +41,14 @@ namespace WebCore { |
class AnimationTimeline; |
class ExceptionState; |
-class AnimationPlayer FINAL : public RefCountedWillBeRefCountedGarbageCollected<AnimationPlayer>, public EventTargetWithInlineData { |
+class AnimationPlayer FINAL : public RefCountedWillBeRefCountedGarbageCollected<AnimationPlayer> |
+ , public ActiveDOMObject |
+ , public EventTargetWithInlineData { |
DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<AnimationPlayer>); |
public: |
~AnimationPlayer(); |
- static PassRefPtrWillBeRawPtr<AnimationPlayer> create(AnimationTimeline&, AnimationSource*); |
+ static PassRefPtrWillBeRawPtr<AnimationPlayer> create(ExecutionContext&, AnimationTimeline&, AnimationSource*); |
// Returns whether the player is finished. |
bool update(TimingUpdateReason); |
@@ -78,6 +81,9 @@ public: |
virtual const AtomicString& interfaceName() const OVERRIDE; |
virtual ExecutionContext* executionContext() const OVERRIDE; |
+ virtual bool hasPendingActivity() const OVERRIDE; |
+ virtual void stop(); |
haraken
2014/05/26 01:16:09
Add OVERRIDE.
dstockwell
2014/05/26 01:32:40
Done.
|
+ virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) OVERRIDE; |
double playbackRate() const { return m_playbackRate; } |
void setPlaybackRate(double); |
@@ -150,7 +156,7 @@ public: |
void trace(Visitor*); |
private: |
- AnimationPlayer(AnimationTimeline&, AnimationSource*); |
+ AnimationPlayer(ExecutionContext&, AnimationTimeline&, AnimationSource*); |
double sourceEnd() const; |
bool limited(double currentTime) const; |
double currentTimeWithoutLag() const; |
@@ -177,6 +183,10 @@ private: |
bool m_outdated; |
bool m_finished; |
+ // Holds a 'finished' event queued for asynchronous dispatch via the |
+ // ScriptedAnimationController. This object remains active until the |
+ // event is actually dispatched. |
+ RefPtrWillBeMember<Event> m_pendingFinishedEvent; |
}; |
} // namespace |