Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: Source/core/animation/AnimationPlayer.h

Issue 284323004: Web Animations: Make AnimationPlayer an ActiveDOMObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/animation/AnimationPlayer.h
diff --git a/Source/core/animation/AnimationPlayer.h b/Source/core/animation/AnimationPlayer.h
index 2d1fd6c509dfb4166b46253feeff789e2a18218c..230f639687d9dc83a8ef1536556b7fa3d5c04ee5 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,7 +41,9 @@ 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:
@@ -78,6 +81,8 @@ public:
virtual const AtomicString& interfaceName() const OVERRIDE;
virtual ExecutionContext* executionContext() const OVERRIDE;
+ virtual bool hasPendingActivity() const OVERRIDE;
haraken 2014/05/23 07:15:05 Don't we need to override ActiveDOMObject::stop()/
dstockwell 2014/05/26 00:47:50 Yes, I suppose stop() is necessary. suspend/resume
haraken 2014/05/26 01:16:09 Makes sense. - I'm just curious, but why are susp
dstockwell 2014/05/26 01:32:40 There's nothing that we need to suspend here. Anim
+ virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) OVERRIDE;
double playbackRate() const { return m_playbackRate; }
void setPlaybackRate(double);
@@ -177,6 +182,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

Powered by Google App Engine
This is Rietveld 408576698