| 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 virtual ~VideoTrack(); | 22 virtual ~VideoTrack(); |
| 23 virtual void trace(Visitor*) override; |
| 22 | 24 |
| 23 bool selected() const { return m_selected; } | 25 bool selected() const { return m_selected; } |
| 24 void setSelected(bool); | 26 void setSelected(bool); |
| 25 | 27 |
| 26 // 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 |
| 27 // another video track is selected, implicitly deselecting this one. | 29 // another video track is selected, implicitly deselecting this one. |
| 28 void clearSelected() { m_selected = false; } | 30 void clearSelected() { m_selected = false; } |
| 29 | 31 |
| 30 // Valid kind keywords. | 32 // Valid kind keywords. |
| 31 static const AtomicString& alternativeKeyword(); | 33 static const AtomicString& alternativeKeyword(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 45 virtual AtomicString defaultKind() const override; | 47 virtual AtomicString defaultKind() const override; |
| 46 | 48 |
| 47 bool m_selected; | 49 bool m_selected; |
| 48 }; | 50 }; |
| 49 | 51 |
| 50 DEFINE_TRACK_TYPE_CASTS(VideoTrack, TrackBase::VideoTrack); | 52 DEFINE_TRACK_TYPE_CASTS(VideoTrack, TrackBase::VideoTrack); |
| 51 | 53 |
| 52 } // namespace blink | 54 } // namespace blink |
| 53 | 55 |
| 54 #endif // VideoTrack_h | 56 #endif // VideoTrack_h |
| OLD | NEW |