| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // origin of the media element's Document, and the default origin behaviour
set to fail. | 90 // origin of the media element's Document, and the default origin behaviour
set to fail. |
| 91 m_loader = TextTrackLoader::create(*this, m_trackElement->document()); | 91 m_loader = TextTrackLoader::create(*this, m_trackElement->document()); |
| 92 if (!m_loader->load(m_url, m_trackElement->mediaElementCrossOriginAttribute(
))) | 92 if (!m_loader->load(m_url, m_trackElement->mediaElementCrossOriginAttribute(
))) |
| 93 m_trackElement->didCompleteLoad(HTMLTrackElement::Failure); | 93 m_trackElement->didCompleteLoad(HTMLTrackElement::Failure); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void LoadableTextTrack::newCuesAvailable(TextTrackLoader* loader) | 96 void LoadableTextTrack::newCuesAvailable(TextTrackLoader* loader) |
| 97 { | 97 { |
| 98 ASSERT_UNUSED(loader, m_loader == loader); | 98 ASSERT_UNUSED(loader, m_loader == loader); |
| 99 | 99 |
| 100 Vector<RefPtr<TextTrackCue> > newCues; | 100 Vector<RefPtr<VTTCue> > newCues; |
| 101 m_loader->getNewCues(newCues); | 101 m_loader->getNewCues(newCues); |
| 102 | 102 |
| 103 if (!m_cues) | 103 if (!m_cues) |
| 104 m_cues = TextTrackCueList::create(); | 104 m_cues = TextTrackCueList::create(); |
| 105 | 105 |
| 106 for (size_t i = 0; i < newCues.size(); ++i) { | 106 for (size_t i = 0; i < newCues.size(); ++i) { |
| 107 newCues[i]->setTrack(this); | 107 newCues[i]->setTrack(this); |
| 108 m_cues->add(newCues[i]); | 108 m_cues->add(newCues[i]); |
| 109 } | 109 } |
| 110 | 110 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 return index; | 148 return index; |
| 149 ++index; | 149 ++index; |
| 150 } | 150 } |
| 151 ASSERT_NOT_REACHED(); | 151 ASSERT_NOT_REACHED(); |
| 152 | 152 |
| 153 return 0; | 153 return 0; |
| 154 } | 154 } |
| 155 | 155 |
| 156 } // namespace WebCore | 156 } // namespace WebCore |
| 157 | 157 |
| OLD | NEW |