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 VideoTrack_h | 5 #ifndef VideoTrack_h |
6 #define VideoTrack_h | 6 #define VideoTrack_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/html/track/TrackBase.h" | 9 #include "core/html/track/TrackBase.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class VideoTrack final : public NoBaseWillBeGarbageCollectedFinalized<VideoTrack
>, public TrackBase, public ScriptWrappable { | 13 class VideoTrack final : public NoBaseWillBeGarbageCollectedFinalized<VideoTrack
>, public TrackBase, public ScriptWrappable { |
14 DEFINE_WRAPPERTYPEINFO(); | 14 DEFINE_WRAPPERTYPEINFO(); |
15 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(VideoTrack); | 15 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(VideoTrack); |
16 public: | 16 public: |
17 static PassRefPtrWillBeRawPtr<VideoTrack> create(const String& id, const Ato
micString& kind, const AtomicString& label, const AtomicString& language, bool s
elected) | 17 static PassRefPtrWillBeRawPtr<VideoTrack> create(const String& id, const Ato
micString& kind, const AtomicString& label, const AtomicString& language, bool s
elected) |
18 { | 18 { |
19 return adoptRefWillBeNoop(new VideoTrack(id, kind, label, language, sele
cted)); | 19 return adoptRefWillBeNoop(new VideoTrack(id, kind, label, language, sele
cted)); |
20 } | 20 } |
21 | 21 |
22 virtual ~VideoTrack(); | 22 virtual ~VideoTrack(); |
23 virtual void trace(Visitor*) override; | 23 DECLARE_VIRTUAL_TRACE(); |
24 | 24 |
25 bool selected() const { return m_selected; } | 25 bool selected() const { return m_selected; } |
26 void setSelected(bool); | 26 void setSelected(bool); |
27 | 27 |
28 // Set selected to false without notifying the owner media element. Used whe
n | 28 // Set selected to false without notifying the owner media element. Used whe
n |
29 // another video track is selected, implicitly deselecting this one. | 29 // another video track is selected, implicitly deselecting this one. |
30 void clearSelected() { m_selected = false; } | 30 void clearSelected() { m_selected = false; } |
31 | 31 |
32 // Valid kind keywords. | 32 // Valid kind keywords. |
33 static const AtomicString& alternativeKeyword(); | 33 static const AtomicString& alternativeKeyword(); |
(...skipping 13 matching lines...) Expand all Loading... |
47 virtual AtomicString defaultKind() const override; | 47 virtual AtomicString defaultKind() const override; |
48 | 48 |
49 bool m_selected; | 49 bool m_selected; |
50 }; | 50 }; |
51 | 51 |
52 DEFINE_TRACK_TYPE_CASTS(VideoTrack, TrackBase::VideoTrack); | 52 DEFINE_TRACK_TYPE_CASTS(VideoTrack, TrackBase::VideoTrack); |
53 | 53 |
54 } // namespace blink | 54 } // namespace blink |
55 | 55 |
56 #endif // VideoTrack_h | 56 #endif // VideoTrack_h |
OLD | NEW |