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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 m_loader->cancelLoad(); | 81 m_loader->cancelLoad(); |
82 | 82 |
83 if (!m_trackElement) | 83 if (!m_trackElement) |
84 return; | 84 return; |
85 | 85 |
86 // 4.8.10.12.3 Sourcing out-of-band text tracks (continued) | 86 // 4.8.10.12.3 Sourcing out-of-band text tracks (continued) |
87 | 87 |
88 // 4. Download: If URL is not the empty string, perform a potentially CORS-e
nabled fetch of URL, with the | 88 // 4. Download: If URL is not the empty string, perform a potentially CORS-e
nabled fetch of URL, with the |
89 // mode being the state of the media element's crossorigin content attribute
, the origin being the | 89 // mode being the state of the media element's crossorigin content attribute
, the origin being the |
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(this, HTMLTrackElement::Failure); | 93 m_trackElement->didCompleteLoad(this, 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<TextTrackCue> > newCues; |
101 m_loader->getNewCues(newCues); | 101 m_loader->getNewCues(newCues); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 return index; | 153 return index; |
154 ++index; | 154 ++index; |
155 } | 155 } |
156 ASSERT_NOT_REACHED(); | 156 ASSERT_NOT_REACHED(); |
157 | 157 |
158 return 0; | 158 return 0; |
159 } | 159 } |
160 | 160 |
161 } // namespace WebCore | 161 } // namespace WebCore |
162 | 162 |
OLD | NEW |