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/AudioTrack.h" | 5 #include "core/html/track/AudioTrack.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 AudioTrack::setEnabled(bool enabled) | 26 void AudioTrack::setEnabled(bool enabled) |
27 { | 27 { |
28 if (enabled == m_enabled) | 28 if (enabled == m_enabled) |
29 return; | 29 return; |
30 | 30 |
31 m_enabled = enabled; | 31 m_enabled = enabled; |
32 | 32 |
33 if (mediaElement()) | 33 if (mediaElement()) |
34 mediaElement()->audioTrackChanged(trackId(), enabled); | 34 mediaElement()->audioTrackChanged(id(), enabled); |
35 } | 35 } |
36 | 36 |
37 const AtomicString& AudioTrack::alternativeKeyword() | 37 const AtomicString& AudioTrack::alternativeKeyword() |
38 { | 38 { |
39 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("alternative")); | 39 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("alternative")); |
40 return keyword; | 40 return keyword; |
41 } | 41 } |
42 | 42 |
43 const AtomicString& AudioTrack::descriptionsKeyword() | 43 const AtomicString& AudioTrack::descriptionsKeyword() |
44 { | 44 { |
(...skipping 30 matching lines...) Expand all Loading... |
75 return kind == alternativeKeyword() | 75 return kind == alternativeKeyword() |
76 || kind == descriptionsKeyword() | 76 || kind == descriptionsKeyword() |
77 || kind == mainKeyword() | 77 || kind == mainKeyword() |
78 || kind == mainDescriptionsKeyword() | 78 || kind == mainDescriptionsKeyword() |
79 || kind == translationKeyword() | 79 || kind == translationKeyword() |
80 || kind == commentaryKeyword() | 80 || kind == commentaryKeyword() |
81 || kind == emptyAtom; | 81 || kind == emptyAtom; |
82 } | 82 } |
83 | 83 |
84 } // namespace blink | 84 } // namespace blink |
OLD | NEW |