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

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

Issue 832713004: Web Animations: Implement the AnimationPlayer finished promise (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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
« no previous file with comments | « Source/bindings/core/v8/ScriptPromiseProperties.h ('k') | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationPlayer.h
diff --git a/Source/core/animation/AnimationPlayer.h b/Source/core/animation/AnimationPlayer.h
index 00feea30b5cbc8918747d6224d09095df48faa65..69da623aaceb381516076a5bb37a1b8148c48fdb 100644
--- a/Source/core/animation/AnimationPlayer.h
+++ b/Source/core/animation/AnimationPlayer.h
@@ -31,8 +31,11 @@
#ifndef AnimationPlayer_h
#define AnimationPlayer_h
+#include "bindings/core/v8/ScriptPromise.h"
+#include "bindings/core/v8/ScriptPromiseProperty.h"
#include "core/animation/AnimationNode.h"
#include "core/dom/ActiveDOMObject.h"
+#include "core/dom/DOMException.h"
#include "core/events/EventTarget.h"
#include "platform/heap/Handle.h"
#include "wtf/RefPtr.h"
@@ -89,6 +92,8 @@ public:
void reverse();
void finish(ExceptionState&);
+ ScriptPromise finished(ScriptState*);
+
bool playing() const { return !(playStateInternal() == Idle || limited() || m_paused || m_isPausedForTesting); }
bool limited() const { return limited(currentTimeInternal()); }
@@ -183,6 +188,9 @@ private:
unsigned m_sequenceNumber;
+ typedef ScriptPromiseProperty<RawPtrWillBeMember<AnimationPlayer>, RawPtrWillBeMember<AnimationPlayer>, RefPtrWillBeMember<DOMException> > AnimationPlayerPromise;
+ PersistentWillBeMember<AnimationPlayerPromise> m_finishedPromise;
+
RefPtrWillBeMember<AnimationNode> m_content;
RawPtrWillBeMember<AnimationTimeline> m_timeline;
// Reflects all pausing, including via pauseForTesting().
@@ -236,7 +244,7 @@ private:
~PlayStateUpdateScope();
private:
RawPtrWillBeMember<AnimationPlayer> m_player;
- AnimationPlayState m_initial;
+ AnimationPlayState m_initialPlayState;
CompositorPendingChange m_compositorPendingChange;
};
« no previous file with comments | « Source/bindings/core/v8/ScriptPromiseProperties.h ('k') | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698