OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef AnimationPlayerEvent_h | 5 #ifndef AnimationPlayerEvent_h |
6 #define AnimationPlayerEvent_h | 6 #define AnimationPlayerEvent_h |
7 | 7 |
8 #include "core/events/AnimationPlayerEventInit.h" | 8 #include "core/events/AnimationPlayerEventInit.h" |
9 #include "core/events/Event.h" | 9 #include "core/events/Event.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class AnimationPlayerEvent final : public Event { | 13 class AnimationPlayerEvent final : public Event { |
14 DEFINE_WRAPPERTYPEINFO(); | 14 DEFINE_WRAPPERTYPEINFO(); |
15 public: | 15 public: |
16 static PassRefPtrWillBeRawPtr<AnimationPlayerEvent> create() | 16 static PassRefPtrWillBeRawPtr<AnimationPlayerEvent> create() |
17 { | 17 { |
18 return adoptRefWillBeNoop(new AnimationPlayerEvent); | 18 return adoptRefWillBeNoop(new AnimationPlayerEvent); |
19 } | 19 } |
20 static PassRefPtrWillBeRawPtr<AnimationPlayerEvent> create(const AtomicStrin
g& type, double currentTime, double timelineTime) | 20 static PassRefPtrWillBeRawPtr<AnimationPlayerEvent> create(const AtomicStrin
g& type, double currentTime, double timelineTime) |
21 { | 21 { |
22 return adoptRefWillBeNoop(new AnimationPlayerEvent(type, currentTime, ti
melineTime)); | 22 return adoptRefWillBeNoop(new AnimationPlayerEvent(type, currentTime, ti
melineTime)); |
23 } | 23 } |
24 static PassRefPtrWillBeRawPtr<AnimationPlayerEvent> create(const AtomicStrin
g& type, const AnimationPlayerEventInit& initializer) | 24 static PassRefPtrWillBeRawPtr<AnimationPlayerEvent> create(const AtomicStrin
g& type, const AnimationPlayerEventInit& initializer) |
25 { | 25 { |
26 return adoptRefWillBeNoop(new AnimationPlayerEvent(type, initializer)); | 26 return adoptRefWillBeNoop(new AnimationPlayerEvent(type, initializer)); |
27 } | 27 } |
28 | 28 |
29 virtual ~AnimationPlayerEvent(); | 29 ~AnimationPlayerEvent() override; |
30 | 30 |
31 double currentTime() const; | 31 double currentTime() const; |
32 double timelineTime() const; | 32 double timelineTime() const; |
33 | 33 |
34 virtual const AtomicString& interfaceName() const override; | 34 const AtomicString& interfaceName() const override; |
35 | 35 |
36 DECLARE_VIRTUAL_TRACE(); | 36 DECLARE_VIRTUAL_TRACE(); |
37 | 37 |
38 private: | 38 private: |
39 AnimationPlayerEvent(); | 39 AnimationPlayerEvent(); |
40 AnimationPlayerEvent(const AtomicString& type, double currentTime, double ti
melineTime); | 40 AnimationPlayerEvent(const AtomicString& type, double currentTime, double ti
melineTime); |
41 AnimationPlayerEvent(const AtomicString&, const AnimationPlayerEventInit&); | 41 AnimationPlayerEvent(const AtomicString&, const AnimationPlayerEventInit&); |
42 | 42 |
43 double m_currentTime; | 43 double m_currentTime; |
44 double m_timelineTime; | 44 double m_timelineTime; |
45 }; | 45 }; |
46 | 46 |
47 } // namespace blink | 47 } // namespace blink |
48 | 48 |
49 #endif // AnimationPlayerEvent_h | 49 #endif // AnimationPlayerEvent_h |
OLD | NEW |