| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef FetchContext_h | 31 #ifndef FetchContext_h |
| 32 #define FetchContext_h | 32 #define FetchContext_h |
| 33 | 33 |
| 34 #include "platform/PlatformExport.h" | 34 #include "platform/PlatformExport.h" |
| 35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
| 36 #include "platform/loader/fetch/CachePolicy.h" | |
| 37 #include "platform/loader/fetch/FetchInitiatorInfo.h" | 36 #include "platform/loader/fetch/FetchInitiatorInfo.h" |
| 38 #include "platform/loader/fetch/FetchRequest.h" | 37 #include "platform/loader/fetch/FetchRequest.h" |
| 39 #include "platform/loader/fetch/Resource.h" | 38 #include "platform/loader/fetch/Resource.h" |
| 40 #include "platform/network/ResourceLoadPriority.h" | 39 #include "platform/network/ResourceLoadPriority.h" |
| 41 #include "platform/network/ResourceRequest.h" | 40 #include "platform/network/ResourceRequest.h" |
| 42 #include "platform/weborigin/SecurityViolationReportingPolicy.h" | 41 #include "platform/weborigin/SecurityViolationReportingPolicy.h" |
| 43 #include "wtf/Forward.h" | 42 #include "wtf/Forward.h" |
| 44 #include "wtf/Noncopyable.h" | 43 #include "wtf/Noncopyable.h" |
| 45 | 44 |
| 46 namespace blink { | 45 namespace blink { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 71 enum LogMessageType { LogErrorMessage, LogWarningMessage }; | 70 enum LogMessageType { LogErrorMessage, LogWarningMessage }; |
| 72 | 71 |
| 73 static FetchContext& nullInstance(); | 72 static FetchContext& nullInstance(); |
| 74 | 73 |
| 75 virtual ~FetchContext() {} | 74 virtual ~FetchContext() {} |
| 76 DEFINE_INLINE_VIRTUAL_TRACE() {} | 75 DEFINE_INLINE_VIRTUAL_TRACE() {} |
| 77 | 76 |
| 78 virtual bool isLiveContext() { return false; } | 77 virtual bool isLiveContext() { return false; } |
| 79 | 78 |
| 80 virtual void addAdditionalRequestHeaders(ResourceRequest&, FetchResourceType); | 79 virtual void addAdditionalRequestHeaders(ResourceRequest&, FetchResourceType); |
| 81 virtual CachePolicy getCachePolicy() const; | 80 |
| 82 // Returns the cache policy for the resource. ResourceRequest is not passed as | 81 // Returns the cache policy for the resource. ResourceRequest is not passed as |
| 83 // a const reference as a header needs to be added for doc.write blocking | 82 // a const reference as a header needs to be added for doc.write blocking |
| 84 // intervention. | 83 // intervention. |
| 85 virtual WebCachePolicy resourceRequestCachePolicy( | 84 virtual WebCachePolicy resourceRequestCachePolicy( |
| 86 ResourceRequest&, | 85 ResourceRequest&, |
| 87 Resource::Type, | 86 Resource::Type, |
| 88 FetchRequest::DeferOption) const; | 87 FetchRequest::DeferOption) const; |
| 89 | 88 |
| 90 virtual void dispatchDidChangeResourcePriority(unsigned long identifier, | 89 virtual void dispatchDidChangeResourcePriority(unsigned long identifier, |
| 91 ResourceLoadPriority, | 90 ResourceLoadPriority, |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 187 |
| 189 virtual RefPtr<WebTaskRunner> loadingTaskRunner() const { return nullptr; } | 188 virtual RefPtr<WebTaskRunner> loadingTaskRunner() const { return nullptr; } |
| 190 | 189 |
| 191 protected: | 190 protected: |
| 192 FetchContext() {} | 191 FetchContext() {} |
| 193 }; | 192 }; |
| 194 | 193 |
| 195 } // namespace blink | 194 } // namespace blink |
| 196 | 195 |
| 197 #endif | 196 #endif |
| OLD | NEW |