| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 144 } |
| 145 | 145 |
| 146 void TextTrackLoader::newCuesParsed() { | 146 void TextTrackLoader::newCuesParsed() { |
| 147 if (m_cueLoadTimer.isActive()) | 147 if (m_cueLoadTimer.isActive()) |
| 148 return; | 148 return; |
| 149 | 149 |
| 150 m_newCuesAvailable = true; | 150 m_newCuesAvailable = true; |
| 151 m_cueLoadTimer.startOneShot(0, BLINK_FROM_HERE); | 151 m_cueLoadTimer.startOneShot(0, BLINK_FROM_HERE); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void TextTrackLoader::newRegionsParsed() { | |
| 155 m_client->newRegionsAvailable(this); | |
| 156 } | |
| 157 | |
| 158 void TextTrackLoader::fileFailedToParse() { | 154 void TextTrackLoader::fileFailedToParse() { |
| 159 m_state = Failed; | 155 m_state = Failed; |
| 160 | 156 |
| 161 if (!m_cueLoadTimer.isActive()) | 157 if (!m_cueLoadTimer.isActive()) |
| 162 m_cueLoadTimer.startOneShot(0, BLINK_FROM_HERE); | 158 m_cueLoadTimer.startOneShot(0, BLINK_FROM_HERE); |
| 163 | 159 |
| 164 cancelLoad(); | 160 cancelLoad(); |
| 165 } | 161 } |
| 166 | 162 |
| 167 void TextTrackLoader::getNewCues(HeapVector<Member<TextTrackCue>>& outputCues) { | 163 void TextTrackLoader::getNewCues(HeapVector<Member<TextTrackCue>>& outputCues) { |
| 168 DCHECK(m_cueParser); | 164 DCHECK(m_cueParser); |
| 169 if (m_cueParser) | 165 if (m_cueParser) |
| 170 m_cueParser->getNewCues(outputCues); | 166 m_cueParser->getNewCues(outputCues); |
| 171 } | 167 } |
| 172 | 168 |
| 173 void TextTrackLoader::getNewRegions( | |
| 174 HeapVector<Member<VTTRegion>>& outputRegions) { | |
| 175 DCHECK(m_cueParser); | |
| 176 if (m_cueParser) | |
| 177 m_cueParser->getNewRegions(outputRegions); | |
| 178 } | |
| 179 | |
| 180 DEFINE_TRACE(TextTrackLoader) { | 169 DEFINE_TRACE(TextTrackLoader) { |
| 181 visitor->trace(m_client); | 170 visitor->trace(m_client); |
| 182 visitor->trace(m_cueParser); | 171 visitor->trace(m_cueParser); |
| 183 visitor->trace(m_document); | 172 visitor->trace(m_document); |
| 184 ResourceOwner<RawResource>::trace(visitor); | 173 ResourceOwner<RawResource>::trace(visitor); |
| 185 VTTParserClient::trace(visitor); | 174 VTTParserClient::trace(visitor); |
| 186 } | 175 } |
| 187 | 176 |
| 188 } // namespace blink | 177 } // namespace blink |
| OLD | NEW |