| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 const AtomicString& TextTrack::metadataKeyword() | 73 const AtomicString& TextTrack::metadataKeyword() |
| 74 { | 74 { |
| 75 DEFINE_STATIC_LOCAL(const AtomicString, metadata, ("metadata")); | 75 DEFINE_STATIC_LOCAL(const AtomicString, metadata, ("metadata")); |
| 76 return metadata; | 76 return metadata; |
| 77 } | 77 } |
| 78 | 78 |
| 79 const AtomicString& TextTrack::disabledKeyword() | 79 const AtomicString& TextTrack::disabledKeyword() |
| 80 { | 80 { |
| 81 DEFINE_STATIC_LOCAL(const AtomicString, open, ("disabled")); | 81 DEFINE_STATIC_LOCAL(const AtomicString, disabled, ("disabled")); |
| 82 return open; | 82 return disabled; |
| 83 } | 83 } |
| 84 | 84 |
| 85 const AtomicString& TextTrack::hiddenKeyword() | 85 const AtomicString& TextTrack::hiddenKeyword() |
| 86 { | 86 { |
| 87 DEFINE_STATIC_LOCAL(const AtomicString, closed, ("hidden")); | 87 DEFINE_STATIC_LOCAL(const AtomicString, hidden, ("hidden")); |
| 88 return closed; | 88 return hidden; |
| 89 } | 89 } |
| 90 | 90 |
| 91 const AtomicString& TextTrack::showingKeyword() | 91 const AtomicString& TextTrack::showingKeyword() |
| 92 { | 92 { |
| 93 DEFINE_STATIC_LOCAL(const AtomicString, ended, ("showing")); | 93 DEFINE_STATIC_LOCAL(const AtomicString, showing, ("showing")); |
| 94 return ended; | 94 return showing; |
| 95 } | 95 } |
| 96 | 96 |
| 97 TextTrack::TextTrack(const AtomicString& kind, const AtomicString& label, const
AtomicString& language, const AtomicString& id, TextTrackType type) | 97 TextTrack::TextTrack(const AtomicString& kind, const AtomicString& label, const
AtomicString& language, const AtomicString& id, TextTrackType type) |
| 98 : TrackBase(WebMediaPlayer::TextTrack, label, language, id) | 98 : TrackBase(WebMediaPlayer::TextTrack, kind, label, language, id) |
| 99 , m_cues(nullptr) | 99 , m_cues(nullptr) |
| 100 , m_regions(nullptr) | 100 , m_regions(nullptr) |
| 101 , m_trackList(nullptr) | 101 , m_trackList(nullptr) |
| 102 , m_mode(disabledKeyword()) | 102 , m_mode(disabledKeyword()) |
| 103 , m_trackType(type) | 103 , m_trackType(type) |
| 104 , m_readinessState(NotLoaded) | 104 , m_readinessState(NotLoaded) |
| 105 , m_trackIndex(invalidTrackIndex) | 105 , m_trackIndex(invalidTrackIndex) |
| 106 , m_renderedTrackIndex(invalidTrackIndex) | 106 , m_renderedTrackIndex(invalidTrackIndex) |
| 107 , m_hasBeenConfigured(false) | 107 , m_hasBeenConfigured(false) |
| 108 { | 108 { |
| 109 setKind(kind); | |
| 110 } | 109 } |
| 111 | 110 |
| 112 TextTrack::~TextTrack() | 111 TextTrack::~TextTrack() |
| 113 { | 112 { |
| 114 } | 113 } |
| 115 | 114 |
| 116 bool TextTrack::isValidKindKeyword(const String& value) | 115 bool TextTrack::isValidKindKeyword(const String& value) |
| 117 { | 116 { |
| 118 if (value == subtitlesKeyword()) | 117 if (value == subtitlesKeyword()) |
| 119 return true; | 118 return true; |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 visitor->trace(m_trackList); | 488 visitor->trace(m_trackList); |
| 490 TrackBase::trace(visitor); | 489 TrackBase::trace(visitor); |
| 491 EventTargetWithInlineData::trace(visitor); | 490 EventTargetWithInlineData::trace(visitor); |
| 492 } | 491 } |
| 493 | 492 |
| 494 DEFINE_TRACE_WRAPPERS(TextTrack) | 493 DEFINE_TRACE_WRAPPERS(TextTrack) |
| 495 { | 494 { |
| 496 visitor->traceWrappers(m_cues); | 495 visitor->traceWrappers(m_cues); |
| 497 } | 496 } |
| 498 } // namespace blink | 497 } // namespace blink |
| OLD | NEW |