OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "wtf/RefCounted.h" | 34 #include "wtf/RefCounted.h" |
35 #include "wtf/Vector.h" | 35 #include "wtf/Vector.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 class GenericEventQueue; | 39 class GenericEventQueue; |
40 class HTMLMediaElement; | 40 class HTMLMediaElement; |
41 class TextTrack; | 41 class TextTrack; |
42 class TextTrackList; | 42 class TextTrackList; |
43 | 43 |
44 class TextTrackList : public RefCounted<TextTrackList>, public ScriptWrappable,
public EventTargetWithInlineData { | 44 class TextTrackList FINAL : public RefCounted<TextTrackList>, public ScriptWrapp
able, public EventTargetWithInlineData { |
45 REFCOUNTED_EVENT_TARGET(TextTrackList); | 45 REFCOUNTED_EVENT_TARGET(TextTrackList); |
46 public: | 46 public: |
47 static PassRefPtr<TextTrackList> create(HTMLMediaElement* owner) | 47 static PassRefPtr<TextTrackList> create(HTMLMediaElement* owner) |
48 { | 48 { |
49 return adoptRef(new TextTrackList(owner)); | 49 return adoptRef(new TextTrackList(owner)); |
50 } | 50 } |
51 ~TextTrackList(); | 51 virtual ~TextTrackList(); |
52 | 52 |
53 unsigned length() const; | 53 unsigned length() const; |
54 int getTrackIndex(TextTrack*); | 54 int getTrackIndex(TextTrack*); |
55 int getTrackIndexRelativeToRenderedTracks(TextTrack*); | 55 int getTrackIndexRelativeToRenderedTracks(TextTrack*); |
56 bool contains(TextTrack*) const; | 56 bool contains(TextTrack*) const; |
57 | 57 |
58 TextTrack* item(unsigned index); | 58 TextTrack* item(unsigned index); |
59 TextTrack* getTrackById(const AtomicString& id); | 59 TextTrack* getTrackById(const AtomicString& id); |
60 void append(PassRefPtr<TextTrack>); | 60 void append(PassRefPtr<TextTrack>); |
61 void remove(TextTrack*); | 61 void remove(TextTrack*); |
(...skipping 26 matching lines...) Expand all Loading... |
88 OwnPtr<GenericEventQueue> m_asyncEventQueue; | 88 OwnPtr<GenericEventQueue> m_asyncEventQueue; |
89 | 89 |
90 Vector<RefPtr<TextTrack> > m_addTrackTracks; | 90 Vector<RefPtr<TextTrack> > m_addTrackTracks; |
91 Vector<RefPtr<TextTrack> > m_elementTracks; | 91 Vector<RefPtr<TextTrack> > m_elementTracks; |
92 Vector<RefPtr<TextTrack> > m_inbandTracks; | 92 Vector<RefPtr<TextTrack> > m_inbandTracks; |
93 }; | 93 }; |
94 | 94 |
95 } // namespace WebCore | 95 } // namespace WebCore |
96 | 96 |
97 #endif | 97 #endif |
OLD | NEW |