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

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

Issue 210363007: Declare onFinish event handler for AnimationPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Stop using ContextLifecycleObserver Created 6 years, 9 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 e8b79ba703ce94f39fd465026292a92e015d2863..0dee2b2d798a9d665a25fc633564df7c018bda20 100644
--- a/Source/core/animation/AnimationPlayer.h
+++ b/Source/core/animation/AnimationPlayer.h
@@ -32,6 +32,7 @@
#define AnimationPlayer_h
#include "core/animation/TimedItem.h"
+#include "core/events/EventTarget.h"
#include "wtf/RefPtr.h"
namespace WebCore {
@@ -39,8 +40,8 @@ namespace WebCore {
class DocumentTimeline;
class ExceptionState;
-class AnimationPlayer FINAL : public RefCounted<AnimationPlayer> {
-
+class AnimationPlayer FINAL : public RefCounted<AnimationPlayer>, public EventTargetWithInlineData {
+ REFCOUNTED_EVENT_TARGET(AnimationPlayer);
public:
~AnimationPlayer();
static PassRefPtr<AnimationPlayer> create(DocumentTimeline&, TimedItem*);
@@ -66,6 +67,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; }
« no previous file with comments | « LayoutTests/webexposed/global-constructors-listing-expected.txt ('k') | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698