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/VideoTrack.h" | 6 #include "core/html/track/VideoTrack.h" |
| 7 | 7 |
| 8 #include "core/html/HTMLMediaElement.h" | 8 #include "core/html/HTMLMediaElement.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("subtitles", AtomicString: :ConstructFromLiteral)); | 62 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("subtitles", AtomicString: :ConstructFromLiteral)); |
| 63 return keyword; | 63 return keyword; |
| 64 } | 64 } |
| 65 | 65 |
| 66 const AtomicString& VideoTrack::commentaryKeyword() | 66 const AtomicString& VideoTrack::commentaryKeyword() |
| 67 { | 67 { |
| 68 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("commentary", AtomicString ::ConstructFromLiteral)); | 68 DEFINE_STATIC_LOCAL(const AtomicString, keyword, ("commentary", AtomicString ::ConstructFromLiteral)); |
| 69 return keyword; | 69 return keyword; |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool VideoTrack::isValidKind(const AtomicString& kind) const | 72 bool VideoTrack::isValidKindKeyword(const AtomicString& kind) |
| 73 { | 73 { |
| 74 return (kind == alternativeKeyword()) | 74 return (kind == alternativeKeyword()) |
| 75 || (kind == captionsKeyword()) | 75 || (kind == captionsKeyword()) |
| 76 || (kind == mainKeyword()) | 76 || (kind == mainKeyword()) |
| 77 || (kind == signKeyword()) | 77 || (kind == signKeyword()) |
| 78 || (kind == subtitlesKeyword()) | 78 || (kind == subtitlesKeyword()) |
| 79 || (kind == commentaryKeyword()); | 79 || (kind == commentaryKeyword()) |
| 80 || (kind == emptyAtom); | |
| 81 } | |
| 82 | |
| 83 bool VideoTrack::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.
| |
| 84 { | |
| 85 return (kind == alternativeKeyword()) | |
| 86 || (kind == captionsKeyword()) | |
| 87 || (kind == mainKeyword()) | |
| 88 || (kind == signKeyword()) | |
| 89 || (kind == subtitlesKeyword()) | |
| 90 || (kind == commentaryKeyword()) | |
| 91 || (kind == emptyAtom); | |
| 80 } | 92 } |
| 81 | 93 |
| 82 AtomicString VideoTrack::defaultKind() const | 94 AtomicString VideoTrack::defaultKind() const |
| 83 { | 95 { |
| 84 return emptyAtom; | 96 return emptyAtom; |
| 85 } | 97 } |
| 86 | 98 |
| 87 } | 99 } |
| OLD | NEW |