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 #include "core/html/track/VideoTrack.h" | 5 #include "core/html/track/VideoTrack.h" |
6 | 6 |
7 #include "core/html/HTMLMediaElement.h" | 7 #include "core/html/HTMLMediaElement.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 } | 24 } |
25 | 25 |
26 void VideoTrack::setSelected(bool selected) | 26 void VideoTrack::setSelected(bool selected) |
27 { | 27 { |
28 if (selected == m_selected) | 28 if (selected == m_selected) |
29 return; | 29 return; |
30 | 30 |
31 m_selected = selected; | 31 m_selected = selected; |
32 | 32 |
33 if (mediaElement()) { | 33 if (mediaElement()) { |
34 WebMediaPlayer::TrackId selectedTrackId = trackId(); | 34 WebMediaPlayer::TrackId selectedTrackId = id(); |
35 mediaElement()->selectedVideoTrackChanged(selected ? &selectedTrackId :
0); | 35 mediaElement()->selectedVideoTrackChanged(selected ? &selectedTrackId :
0); |
36 } | 36 } |
37 } | 37 } |
38 | 38 |
39 const AtomicString& VideoTrack::alternativeKeyword() | 39 const AtomicString& VideoTrack::alternativeKeyword() |
40 { | 40 { |
41 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("alternative")); | 41 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("alternative")); |
42 return keyword; | 42 return keyword; |
43 } | 43 } |
44 | 44 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 return kind == alternativeKeyword() | 77 return kind == alternativeKeyword() |
78 || kind == captionsKeyword() | 78 || kind == captionsKeyword() |
79 || kind == mainKeyword() | 79 || kind == mainKeyword() |
80 || kind == signKeyword() | 80 || kind == signKeyword() |
81 || kind == subtitlesKeyword() | 81 || kind == subtitlesKeyword() |
82 || kind == commentaryKeyword() | 82 || kind == commentaryKeyword() |
83 || kind == emptyAtom; | 83 || kind == emptyAtom; |
84 } | 84 } |
85 | 85 |
86 } // namespace blink | 86 } // namespace blink |
OLD | NEW |