1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef AnimationPlayerEvent_h
6 #define AnimationPlayerEvent_h
8 #include "core/events/Event.h"
12 struct AnimationPlayerEventInit : public EventInit {
13 AnimationPlayerEventInit();
19 class AnimationPlayerEvent final : public Event {
20 DEFINE_WRAPPERTYPEINFO();
22 static PassRefPtrWillBeRawPtr<AnimationPlayerEvent> create()
24 return adoptRefWillBeNoop(new AnimationPlayerEvent);
26 static PassRefPtrWillBeRawPtr<AnimationPlayerEvent> create(const AtomicString& type, double currentTime, double timelineTime)
28 return adoptRefWillBeNoop(new AnimationPlayerEvent(type, currentTime, timelineTime));
30 static PassRefPtrWillBeRawPtr<AnimationPlayerEvent> create(const AtomicString& type, const AnimationPlayerEventInit& initializer)
32 return adoptRefWillBeNoop(new AnimationPlayerEvent(type, initializer));
35 virtual ~AnimationPlayerEvent();
37 double currentTime() const;
38 double timelineTime() const;
40 virtual const AtomicString& interfaceName() const override;
42 virtual void trace(Visitor*) override;
45 AnimationPlayerEvent();
46 AnimationPlayerEvent(const AtomicString& type, double currentTime, double timelineTime);
47 AnimationPlayerEvent(const AtomicString&, const AnimationPlayerEventInit&);
50 double m_timelineTime;
55 #endif // AnimationPlayerEvent_h