| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 updateRequestForAccessControl(cueRequest.mutableResourceRequest(), m_doc
ument.securityOrigin(), allowCredentials); | 124 updateRequestForAccessControl(cueRequest.mutableResourceRequest(), m_doc
ument.securityOrigin(), allowCredentials); |
| 125 } else { | 125 } else { |
| 126 // Cross-origin resources that are not suitably CORS-enabled may not loa
d. | 126 // Cross-origin resources that are not suitably CORS-enabled may not loa
d. |
| 127 if (!m_document.securityOrigin()->canRequest(url)) { | 127 if (!m_document.securityOrigin()->canRequest(url)) { |
| 128 corsPolicyPreventedLoad(); | 128 corsPolicyPreventedLoad(); |
| 129 return false; | 129 return false; |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 | 132 |
| 133 ResourceFetcher* fetcher = m_document.fetcher(); | 133 ResourceFetcher* fetcher = m_document.fetcher(); |
| 134 setResource(fetcher->fetchRawResource(cueRequest)); | 134 setResource(fetcher->fetchTextTrack(cueRequest)); |
| 135 return resource(); | 135 return resource(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void TextTrackLoader::newCuesParsed() | 138 void TextTrackLoader::newCuesParsed() |
| 139 { | 139 { |
| 140 if (m_cueLoadTimer.isActive()) | 140 if (m_cueLoadTimer.isActive()) |
| 141 return; | 141 return; |
| 142 | 142 |
| 143 m_newCuesAvailable = true; | 143 m_newCuesAvailable = true; |
| 144 m_cueLoadTimer.startOneShot(0); | 144 m_cueLoadTimer.startOneShot(0); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 169 } | 169 } |
| 170 | 170 |
| 171 void TextTrackLoader::getNewRegions(Vector<RefPtr<VTTRegion> >& outputRegions) | 171 void TextTrackLoader::getNewRegions(Vector<RefPtr<VTTRegion> >& outputRegions) |
| 172 { | 172 { |
| 173 ASSERT(m_cueParser); | 173 ASSERT(m_cueParser); |
| 174 if (m_cueParser) | 174 if (m_cueParser) |
| 175 m_cueParser->getNewRegions(outputRegions); | 175 m_cueParser->getNewRegions(outputRegions); |
| 176 } | 176 } |
| 177 | 177 |
| 178 } | 178 } |
| OLD | NEW |