Chromium Code Reviews| Index: Source/core/animation/AnimationPlayer.h |
| diff --git a/Source/core/animation/AnimationPlayer.h b/Source/core/animation/AnimationPlayer.h |
| index e8b79ba703ce94f39fd465026292a92e015d2863..2fc2d06b967067142a4d6c6113da05a60f58fa71 100644 |
| --- a/Source/core/animation/AnimationPlayer.h |
| +++ b/Source/core/animation/AnimationPlayer.h |
| @@ -32,6 +32,8 @@ |
| #define AnimationPlayer_h |
| #include "core/animation/TimedItem.h" |
| +#include "core/dom/ActiveDOMObject.h" |
| +#include "core/events/EventTarget.h" |
| #include "wtf/RefPtr.h" |
| namespace WebCore { |
| @@ -39,11 +41,11 @@ namespace WebCore { |
| class DocumentTimeline; |
| class ExceptionState; |
| -class AnimationPlayer FINAL : public RefCounted<AnimationPlayer> { |
| - |
| +class AnimationPlayer FINAL : public RefCounted<AnimationPlayer>, public EventTargetWithInlineData, public ActiveDOMObject { |
|
dstockwell
2014/03/31 06:32:53
Why does AnimationPlayer become an ActiveDOMObject
Eric Willigers
2014/03/31 08:48:47
Changed to use ContextLifecycleObserver.
As an ev
|
| + REFCOUNTED_EVENT_TARGET(AnimationPlayer); |
| public: |
| ~AnimationPlayer(); |
| - static PassRefPtr<AnimationPlayer> create(DocumentTimeline&, TimedItem*); |
| + static PassRefPtr<AnimationPlayer> create(ExecutionContext*, DocumentTimeline&, TimedItem*); |
| // Returns whether this player is still current or in effect. |
| bool update(); |
| @@ -66,6 +68,11 @@ public: |
| void finish(ExceptionState&); |
| bool finished() { return limited(currentTime()); } |
| + DEFINE_ATTRIBUTE_EVENT_LISTENER(finish); |
| + |
| + virtual const AtomicString& interfaceName() const OVERRIDE; |
| + virtual ExecutionContext* executionContext() const OVERRIDE; |
| + |
| double playbackRate() const { return m_playbackRate; } |
| void setPlaybackRate(double); |
| const DocumentTimeline* timeline() const { return m_timeline; } |
| @@ -118,7 +125,7 @@ public: |
| } |
| private: |
| - AnimationPlayer(DocumentTimeline&, TimedItem*); |
| + AnimationPlayer(ExecutionContext*, DocumentTimeline&, TimedItem*); |
| double sourceEnd() const; |
| bool limited(double currentTime) const; |
| double currentTimeWithoutLag() const; |