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 12 matching lines...) Expand all Loading... |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "core/html/HTMLTrackElement.h" | 27 #include "core/html/HTMLTrackElement.h" |
28 | 28 |
29 #include "core/HTMLNames.h" | 29 #include "core/HTMLNames.h" |
30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
31 #include "core/events/Event.h" | 31 #include "core/events/Event.h" |
32 #include "core/frame/csp/ContentSecurityPolicy.h" | 32 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 33 #include "core/html/CrossOriginAttribute.h" |
33 #include "core/html/HTMLMediaElement.h" | 34 #include "core/html/HTMLMediaElement.h" |
34 #include "core/html/track/LoadableTextTrack.h" | 35 #include "core/html/track/LoadableTextTrack.h" |
35 #include "platform/Logging.h" | 36 #include "platform/Logging.h" |
36 | 37 |
37 namespace blink { | 38 namespace blink { |
38 | 39 |
39 using namespace HTMLNames; | 40 using namespace HTMLNames; |
40 | 41 |
41 #if !LOG_DISABLED | 42 #if !LOG_DISABLED |
42 static String urlForLoggingTrack(const KURL& url) | 43 static String urlForLoggingTrack(const KURL& url) |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 207 } |
207 return; | 208 return; |
208 } | 209 } |
209 | 210 |
210 m_url = url; | 211 m_url = url; |
211 | 212 |
212 if (m_loader) | 213 if (m_loader) |
213 m_loader->cancelLoad(); | 214 m_loader->cancelLoad(); |
214 | 215 |
215 m_loader = TextTrackLoader::create(*this, document()); | 216 m_loader = TextTrackLoader::create(*this, document()); |
216 if (!m_loader->load(m_url, corsMode)) | 217 if (!m_loader->load(m_url, crossOriginAttributeValue(corsMode))) |
217 didCompleteLoad(Failure); | 218 didCompleteLoad(Failure); |
218 } | 219 } |
219 | 220 |
220 bool HTMLTrackElement::canLoadUrl(const KURL& url) | 221 bool HTMLTrackElement::canLoadUrl(const KURL& url) |
221 { | 222 { |
222 HTMLMediaElement* parent = mediaElement(); | 223 HTMLMediaElement* parent = mediaElement(); |
223 if (!parent) | 224 if (!parent) |
224 return false; | 225 return false; |
225 | 226 |
226 if (url.isEmpty()) | 227 if (url.isEmpty()) |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 } | 330 } |
330 | 331 |
331 DEFINE_TRACE(HTMLTrackElement) | 332 DEFINE_TRACE(HTMLTrackElement) |
332 { | 333 { |
333 visitor->trace(m_track); | 334 visitor->trace(m_track); |
334 visitor->trace(m_loader); | 335 visitor->trace(m_loader); |
335 HTMLElement::trace(visitor); | 336 HTMLElement::trace(visitor); |
336 } | 337 } |
337 | 338 |
338 } | 339 } |
OLD | NEW |