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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 | 793 |
794 if (m_options.timeoutMilliseconds > 0) | 794 if (m_options.timeoutMilliseconds > 0) |
795 m_timeoutTimer.startOneShot(m_options.timeoutMilliseconds / 1000.0,
BLINK_FROM_HERE); | 795 m_timeoutTimer.startOneShot(m_options.timeoutMilliseconds / 1000.0,
BLINK_FROM_HERE); |
796 | 796 |
797 FetchRequest newRequest(request, m_options.initiator, resourceLoaderOpti
ons); | 797 FetchRequest newRequest(request, m_options.initiator, resourceLoaderOpti
ons); |
798 if (m_options.crossOriginRequestPolicy == AllowCrossOriginRequests) | 798 if (m_options.crossOriginRequestPolicy == AllowCrossOriginRequests) |
799 newRequest.setOriginRestriction(FetchRequest::NoOriginRestriction); | 799 newRequest.setOriginRestriction(FetchRequest::NoOriginRestriction); |
800 ASSERT(!resource()); | 800 ASSERT(!resource()); |
801 if (request.requestContext() == WebURLRequest::RequestContextVideo || re
quest.requestContext() == WebURLRequest::RequestContextAudio) | 801 if (request.requestContext() == WebURLRequest::RequestContextVideo || re
quest.requestContext() == WebURLRequest::RequestContextAudio) |
802 setResource(RawResource::fetchMedia(newRequest, document().fetcher()
)); | 802 setResource(RawResource::fetchMedia(newRequest, document().fetcher()
)); |
| 803 else if (request.requestContext() == WebURLRequest::RequestContextManife
st) |
| 804 setResource(RawResource::fetchManifest(newRequest, document().fetche
r())); |
803 else | 805 else |
804 setResource(RawResource::fetch(newRequest, document().fetcher())); | 806 setResource(RawResource::fetch(newRequest, document().fetcher())); |
805 if (resource() && resource()->loader()) { | 807 if (resource() && resource()->loader()) { |
806 unsigned long identifier = resource()->identifier(); | 808 unsigned long identifier = resource()->identifier(); |
807 InspectorInstrumentation::documentThreadableLoaderStartedLoadingForC
lient(m_document, identifier, m_client); | 809 InspectorInstrumentation::documentThreadableLoaderStartedLoadingForC
lient(m_document, identifier, m_client); |
808 } | 810 } |
809 return; | 811 return; |
810 } | 812 } |
811 | 813 |
812 FetchRequest fetchRequest(request, m_options.initiator, resourceLoaderOption
s); | 814 FetchRequest fetchRequest(request, m_options.initiator, resourceLoaderOption
s); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 return m_securityOrigin ? m_securityOrigin.get() : document().securityOrigin
(); | 890 return m_securityOrigin ? m_securityOrigin.get() : document().securityOrigin
(); |
889 } | 891 } |
890 | 892 |
891 Document& DocumentThreadableLoader::document() const | 893 Document& DocumentThreadableLoader::document() const |
892 { | 894 { |
893 ASSERT(m_document); | 895 ASSERT(m_document); |
894 return *m_document; | 896 return *m_document; |
895 } | 897 } |
896 | 898 |
897 } // namespace blink | 899 } // namespace blink |
OLD | NEW |