Chromium Code Reviews| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/html/track/AudioTrack.h" | 6 #include "core/html/track/AudioTrack.h" |
| 7 | 7 |
| 8 #include "core/html/HTMLMediaElement.h" | 8 #include "core/html/HTMLMediaElement.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("translation", AtomicStrin g::ConstructFromLiteral)); | 60 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("translation", AtomicStrin g::ConstructFromLiteral)); |
| 61 return keyword; | 61 return keyword; |
| 62 } | 62 } |
| 63 | 63 |
| 64 const AtomicString& AudioTrack::commentaryKeyword() | 64 const AtomicString& AudioTrack::commentaryKeyword() |
| 65 { | 65 { |
| 66 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("commentary", AtomicString ::ConstructFromLiteral)); | 66 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("commentary", AtomicString ::ConstructFromLiteral)); |
| 67 return keyword; | 67 return keyword; |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool AudioTrack::isValidKind(const AtomicString& kind) const | 70 bool AudioTrack::isValidKindKeyword(const AtomicString& kind) |
| 71 { | 71 { |
| 72 return (kind == alternativeKeyword()) | 72 return (kind == alternativeKeyword()) |
| 73 || (kind == descriptionsKeyword()) | 73 || (kind == descriptionsKeyword()) |
| 74 || (kind == mainKeyword()) | 74 || (kind == mainKeyword()) |
| 75 || (kind == mainDescriptionsKeyword()) | 75 || (kind == mainDescriptionsKeyword()) |
| 76 || (kind == translationKeyword()) | 76 || (kind == translationKeyword()) |
| 77 || (kind == commentaryKeyword()); | 77 || (kind == commentaryKeyword()) |
| 78 || (kind == emptyAtom); | |
|
philipj_slow
2014/11/14 12:03:37
Can you add to the commit message the reason why t
wolenetz
2014/11/17 21:51:07
Done.
| |
| 79 } | |
| 80 | |
| 81 bool AudioTrack::isValidKindKeyword(const String& kind) | |
|
philipj_slow
2014/11/14 12:03:37
AtomicString is free to convert to String (and has
wolenetz
2014/11/17 21:51:07
Done.
| |
| 82 { | |
| 83 return (kind == alternativeKeyword()) | |
| 84 || (kind == descriptionsKeyword()) | |
| 85 || (kind == mainKeyword()) | |
| 86 || (kind == mainDescriptionsKeyword()) | |
| 87 || (kind == translationKeyword()) | |
| 88 || (kind == commentaryKeyword()) | |
| 89 || (kind == emptyAtom); | |
| 78 } | 90 } |
| 79 | 91 |
| 80 AtomicString AudioTrack::defaultKind() const | 92 AtomicString AudioTrack::defaultKind() const |
| 81 { | 93 { |
| 82 return emptyAtom; | 94 return emptyAtom; |
| 83 } | 95 } |
| 84 | 96 |
| 85 } | 97 } |
| OLD | NEW |