OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 if (m_actualRequest) { | 377 if (m_actualRequest) { |
378 options.sniffContent = DoNotSniffContent; | 378 options.sniffContent = DoNotSniffContent; |
379 options.dataBufferingPolicy = BufferData; | 379 options.dataBufferingPolicy = BufferData; |
380 } | 380 } |
381 | 381 |
382 if (m_options.timeoutMilliseconds > 0) | 382 if (m_options.timeoutMilliseconds > 0) |
383 m_timeoutTimer.startOneShot(m_options.timeoutMilliseconds / 1000.0,
FROM_HERE); | 383 m_timeoutTimer.startOneShot(m_options.timeoutMilliseconds / 1000.0,
FROM_HERE); |
384 | 384 |
385 FetchRequest newRequest(request, m_options.initiator, options); | 385 FetchRequest newRequest(request, m_options.initiator, options); |
386 ASSERT(!resource()); | 386 ASSERT(!resource()); |
387 setResource(m_document.fetcher()->fetchRawResource(newRequest)); | 387 if (request.targetType() == ResourceRequest::TargetIsMedia) |
| 388 setResource(m_document.fetcher()->fetchMedia(newRequest)); |
| 389 else |
| 390 setResource(m_document.fetcher()->fetchRawResource(newRequest)); |
388 if (resource() && resource()->loader()) { | 391 if (resource() && resource()->loader()) { |
389 unsigned long identifier = resource()->identifier(); | 392 unsigned long identifier = resource()->identifier(); |
390 InspectorInstrumentation::documentThreadableLoaderStartedLoadingForC
lient(&m_document, identifier, m_client); | 393 InspectorInstrumentation::documentThreadableLoaderStartedLoadingForC
lient(&m_document, identifier, m_client); |
391 } | 394 } |
392 return; | 395 return; |
393 } | 396 } |
394 | 397 |
395 FetchRequest fetchRequest(request, m_options.initiator, options); | 398 FetchRequest fetchRequest(request, m_options.initiator, options); |
396 ResourcePtr<Resource> resource = m_document.fetcher()->fetchSynchronously(fe
tchRequest); | 399 ResourcePtr<Resource> resource = m_document.fetcher()->fetchSynchronously(fe
tchRequest); |
397 ResourceResponse response = resource ? resource->response() : ResourceRespon
se(); | 400 ResourceResponse response = resource ? resource->response() : ResourceRespon
se(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 return true; | 446 return true; |
444 return m_document.contentSecurityPolicy()->allowConnectToSource(url); | 447 return m_document.contentSecurityPolicy()->allowConnectToSource(url); |
445 } | 448 } |
446 | 449 |
447 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const | 450 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const |
448 { | 451 { |
449 return m_options.securityOrigin ? m_options.securityOrigin.get() : m_documen
t.securityOrigin(); | 452 return m_options.securityOrigin ? m_options.securityOrigin.get() : m_documen
t.securityOrigin(); |
450 } | 453 } |
451 | 454 |
452 } // namespace WebCore | 455 } // namespace WebCore |
OLD | NEW |