| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 if (m_state >= Finished) | 62 if (m_state >= Finished) |
| 63 m_client.cueLoadingCompleted(this, m_state == Failed); | 63 m_client.cueLoadingCompleted(this, m_state == Failed); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void TextTrackLoader::cancelLoad() | 66 void TextTrackLoader::cancelLoad() |
| 67 { | 67 { |
| 68 clearResource(); | 68 clearResource(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void TextTrackLoader::dataReceived(Resource* resource, const char* data, unsigne
d length) | 71 void TextTrackLoader::dataReceived(Resource* resource, const char* data, size_t
length) |
| 72 { | 72 { |
| 73 ASSERT(this->resource() == resource); | 73 ASSERT(this->resource() == resource); |
| 74 | 74 |
| 75 if (m_state == Failed) | 75 if (m_state == Failed) |
| 76 return; | 76 return; |
| 77 | 77 |
| 78 if (!m_cueParser) | 78 if (!m_cueParser) |
| 79 m_cueParser = VTTParser::create(this, document()); | 79 m_cueParser = VTTParser::create(this, document()); |
| 80 | 80 |
| 81 m_cueParser->parseBytes(data, length); | 81 m_cueParser->parseBytes(data, length); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 m_cueParser->getNewRegions(outputRegions); | 162 m_cueParser->getNewRegions(outputRegions); |
| 163 } | 163 } |
| 164 | 164 |
| 165 DEFINE_TRACE(TextTrackLoader) | 165 DEFINE_TRACE(TextTrackLoader) |
| 166 { | 166 { |
| 167 visitor->trace(m_cueParser); | 167 visitor->trace(m_cueParser); |
| 168 visitor->trace(m_document); | 168 visitor->trace(m_document); |
| 169 } | 169 } |
| 170 | 170 |
| 171 } | 171 } |
| OLD | NEW |