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

Unified Diff: Source/core/events/AnimationPlayerEvent.cpp

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
« no previous file with comments | « Source/core/events/AnimationPlayerEvent.h ('k') | Source/core/events/AnimationPlayerEvent.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/AnimationPlayerEvent.cpp
diff --git a/Source/core/events/AnimationPlayerEvent.cpp b/Source/core/events/AnimationPlayerEvent.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..206e2c16b652d875c3420f871319f99cdbae477d
--- /dev/null
+++ b/Source/core/events/AnimationPlayerEvent.cpp
@@ -0,0 +1,63 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "core/events/AnimationPlayerEvent.h"
+
+namespace WebCore {
+
+AnimationPlayerEventInit::AnimationPlayerEventInit()
+ : currentTime(0.0)
+ , timelineTime(0.0)
+{
+}
+
+AnimationPlayerEvent::AnimationPlayerEvent()
+ : m_currentTime(0.0)
+ , m_timelineTime(0.0)
+{
+ ScriptWrappable::init(this);
+}
+
+AnimationPlayerEvent::AnimationPlayerEvent(const AtomicString& type, double currentTime, double timelineTime)
+ : Event(type, false, false)
+ , m_currentTime(currentTime)
+ , m_timelineTime(timelineTime)
+{
+ ScriptWrappable::init(this);
+}
+
+AnimationPlayerEvent::AnimationPlayerEvent(const AtomicString& type, const AnimationPlayerEventInit& initializer)
+ : Event(type, initializer)
+ , m_currentTime(initializer.currentTime)
+ , m_timelineTime(initializer.timelineTime)
+{
+ ScriptWrappable::init(this);
+}
+
+AnimationPlayerEvent::~AnimationPlayerEvent()
+{
+}
+
+double AnimationPlayerEvent::currentTime() const
+{
+ return m_currentTime;
+}
+
+double AnimationPlayerEvent::timelineTime() const
+{
+ return m_timelineTime;
+}
+
+const AtomicString& AnimationPlayerEvent::interfaceName() const
+{
+ return EventNames::AnimationPlayerEvent;
+}
+
+void AnimationPlayerEvent::trace(Visitor* visitor)
+{
+ Event::trace(visitor);
+}
+
+} // namespace WebCore
« no previous file with comments | « Source/core/events/AnimationPlayerEvent.h ('k') | Source/core/events/AnimationPlayerEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698