OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 16 matching lines...) Expand all Loading... |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #ifndef TextTrackCue_h | 32 #ifndef TextTrackCue_h |
33 #define TextTrackCue_h | 33 #define TextTrackCue_h |
34 | 34 |
35 #include "core/events/EventTarget.h" | 35 #include "core/events/EventTarget.h" |
36 #include "core/html/HTMLDivElement.h" | 36 #include "core/html/HTMLDivElement.h" |
| 37 #include "platform/heap/Handle.h" |
37 #include "wtf/RefCounted.h" | 38 #include "wtf/RefCounted.h" |
38 | 39 |
39 namespace WebCore { | 40 namespace WebCore { |
40 | 41 |
41 class ExceptionState; | 42 class ExceptionState; |
42 | 43 |
43 class TextTrackCue : public RefCounted<TextTrackCue>, public EventTargetWithInli
neData { | 44 class TextTrackCue : public RefCountedWillBeRefCountedGarbageCollected<TextTrack
Cue>, public EventTargetWithInlineData { |
44 REFCOUNTED_EVENT_TARGET(TextTrackCue); | 45 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<T
extTrackCue>); |
45 public: | 46 public: |
46 static bool isInfiniteOrNonNumber(double value, ExceptionState&); | 47 static bool isInfiniteOrNonNumber(double value, ExceptionState&); |
47 | 48 |
48 static const AtomicString& cueShadowPseudoId() | 49 static const AtomicString& cueShadowPseudoId() |
49 { | 50 { |
50 DEFINE_STATIC_LOCAL(const AtomicString, cue, ("cue", AtomicString::Const
ructFromLiteral)); | 51 DEFINE_STATIC_LOCAL(const AtomicString, cue, ("cue", AtomicString::Const
ructFromLiteral)); |
51 return cue; | 52 return cue; |
52 } | 53 } |
53 | 54 |
54 virtual ~TextTrackCue() { } | 55 virtual ~TextTrackCue() { } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 88 |
88 virtual const AtomicString& interfaceName() const OVERRIDE; | 89 virtual const AtomicString& interfaceName() const OVERRIDE; |
89 | 90 |
90 #ifndef NDEBUG | 91 #ifndef NDEBUG |
91 virtual String toString() const = 0; | 92 virtual String toString() const = 0; |
92 #endif | 93 #endif |
93 | 94 |
94 DEFINE_ATTRIBUTE_EVENT_LISTENER(enter); | 95 DEFINE_ATTRIBUTE_EVENT_LISTENER(enter); |
95 DEFINE_ATTRIBUTE_EVENT_LISTENER(exit); | 96 DEFINE_ATTRIBUTE_EVENT_LISTENER(exit); |
96 | 97 |
| 98 virtual void trace(Visitor*); |
| 99 |
97 protected: | 100 protected: |
98 TextTrackCue(double start, double end); | 101 TextTrackCue(double start, double end); |
99 | 102 |
100 void cueWillChange(); | 103 void cueWillChange(); |
101 virtual void cueDidChange(); | 104 virtual void cueDidChange(); |
102 | 105 |
103 private: | 106 private: |
104 AtomicString m_id; | 107 AtomicString m_id; |
105 double m_startTime; | 108 double m_startTime; |
106 double m_endTime; | 109 double m_endTime; |
107 int m_cueIndex; | 110 int m_cueIndex; |
108 | 111 |
109 TextTrack* m_track; | 112 RawPtrWillBeMember<TextTrack> m_track; |
110 | 113 |
111 bool m_isActive : 1; | 114 bool m_isActive : 1; |
112 bool m_pauseOnExit : 1; | 115 bool m_pauseOnExit : 1; |
113 }; | 116 }; |
114 | 117 |
115 } // namespace WebCore | 118 } // namespace WebCore |
116 | 119 |
117 #endif | 120 #endif |
OLD | NEW |