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 17 matching lines...) Expand all Loading... |
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 "bindings/v8/ScriptWrappable.h" | 35 #include "bindings/v8/ScriptWrappable.h" |
36 #include "core/events/EventTarget.h" | 36 #include "core/events/EventTarget.h" |
37 #include "core/html/HTMLDivElement.h" | 37 #include "core/html/HTMLDivElement.h" |
| 38 #include "core/page/UseCounter.h" |
38 #include "wtf/RefCounted.h" | 39 #include "wtf/RefCounted.h" |
39 | 40 |
40 namespace WebCore { | 41 namespace WebCore { |
41 | 42 |
42 class Document; | 43 class Document; |
43 class DocumentFragment; | 44 class DocumentFragment; |
44 class ExceptionState; | 45 class ExceptionState; |
45 class ExecutionContext; | 46 class ExecutionContext; |
46 class TextTrack; | 47 class TextTrack; |
47 class TextTrackCue; | 48 class TextTrackCue; |
(...skipping 20 matching lines...) Expand all Loading... |
68 TextTrackCue* m_cue; | 69 TextTrackCue* m_cue; |
69 }; | 70 }; |
70 | 71 |
71 // ---------------------------- | 72 // ---------------------------- |
72 | 73 |
73 class TextTrackCue : public RefCounted<TextTrackCue>, public ScriptWrappable, pu
blic EventTargetWithInlineData { | 74 class TextTrackCue : public RefCounted<TextTrackCue>, public ScriptWrappable, pu
blic EventTargetWithInlineData { |
74 REFCOUNTED_EVENT_TARGET(TextTrackCue); | 75 REFCOUNTED_EVENT_TARGET(TextTrackCue); |
75 public: | 76 public: |
76 static PassRefPtr<TextTrackCue> create(Document& document, double start, dou
ble end, const String& content) | 77 static PassRefPtr<TextTrackCue> create(Document& document, double start, dou
ble end, const String& content) |
77 { | 78 { |
| 79 UseCounter::count(document, UseCounter::TextTrackCueConstructor); |
78 return adoptRef(new TextTrackCue(document, start, end, content)); | 80 return adoptRef(new TextTrackCue(document, start, end, content)); |
79 } | 81 } |
80 | 82 |
81 static const AtomicString& cueShadowPseudoId() | 83 static const AtomicString& cueShadowPseudoId() |
82 { | 84 { |
83 DEFINE_STATIC_LOCAL(const AtomicString, cue, ("cue", AtomicString::Const
ructFromLiteral)); | 85 DEFINE_STATIC_LOCAL(const AtomicString, cue, ("cue", AtomicString::Const
ructFromLiteral)); |
84 return cue; | 86 return cue; |
85 } | 87 } |
86 | 88 |
87 virtual ~TextTrackCue(); | 89 virtual ~TextTrackCue(); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 int m_displaySize; | 260 int m_displaySize; |
259 | 261 |
260 std::pair<float, float> m_displayPosition; | 262 std::pair<float, float> m_displayPosition; |
261 String m_regionId; | 263 String m_regionId; |
262 bool m_notifyRegion; | 264 bool m_notifyRegion; |
263 }; | 265 }; |
264 | 266 |
265 } // namespace WebCore | 267 } // namespace WebCore |
266 | 268 |
267 #endif | 269 #endif |
OLD | NEW |