| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 namespace blink { | 45 namespace blink { |
| 46 | 46 |
| 47 class ClientHintsPreferences; | 47 class ClientHintsPreferences; |
| 48 class KURL; | 48 class KURL; |
| 49 class MHTMLArchive; | 49 class MHTMLArchive; |
| 50 class PlatformProbeSink; | 50 class PlatformProbeSink; |
| 51 class ResourceError; | 51 class ResourceError; |
| 52 class ResourceResponse; | 52 class ResourceResponse; |
| 53 class ResourceTimingInfo; | 53 class ResourceTimingInfo; |
| 54 class WebTaskRunner; | 54 class WebTaskRunner; |
| 55 class WebURLLoader; |
| 55 enum class WebCachePolicy; | 56 enum class WebCachePolicy; |
| 56 | 57 |
| 57 enum FetchResourceType { FetchMainResource, FetchSubresource }; | 58 enum FetchResourceType { FetchMainResource, FetchSubresource }; |
| 58 | 59 |
| 59 // The FetchContext is an interface for performing context specific processing | 60 // The FetchContext is an interface for performing context specific processing |
| 60 // in response to events in the ResourceFetcher. The ResourceFetcher or its job | 61 // in response to events in the ResourceFetcher. The ResourceFetcher or its job |
| 61 // class, ResourceLoader, may call the methods on a FetchContext. | 62 // class, ResourceLoader, may call the methods on a FetchContext. |
| 62 // | 63 // |
| 63 // Any processing that depends on components outside platform/loader/fetch/ | 64 // Any processing that depends on components outside platform/loader/fetch/ |
| 64 // should be implemented on a subclass of this interface, and then exposed to | 65 // should be implemented on a subclass of this interface, and then exposed to |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 Resource::Type, | 159 Resource::Type, |
| 159 const ResourceRequest&, | 160 const ResourceRequest&, |
| 160 const KURL&, | 161 const KURL&, |
| 161 const ResourceLoaderOptions&) const { | 162 const ResourceLoaderOptions&) const { |
| 162 return ResourceRequestBlockedReason::Other; | 163 return ResourceRequestBlockedReason::Other; |
| 163 } | 164 } |
| 164 | 165 |
| 165 virtual bool isControlledByServiceWorker() const { return false; } | 166 virtual bool isControlledByServiceWorker() const { return false; } |
| 166 virtual int64_t serviceWorkerID() const { return -1; } | 167 virtual int64_t serviceWorkerID() const { return -1; } |
| 167 | 168 |
| 169 virtual int applicationCacheHostID() const { return 0; } |
| 170 |
| 168 virtual bool isMainFrame() const { return true; } | 171 virtual bool isMainFrame() const { return true; } |
| 169 virtual bool defersLoading() const { return false; } | 172 virtual bool defersLoading() const { return false; } |
| 170 virtual bool isLoadComplete() const { return false; } | 173 virtual bool isLoadComplete() const { return false; } |
| 171 virtual bool pageDismissalEventBeingDispatched() const { return false; } | 174 virtual bool pageDismissalEventBeingDispatched() const { return false; } |
| 172 virtual bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) { | 175 virtual bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) { |
| 173 return false; | 176 return false; |
| 174 } | 177 } |
| 175 virtual void sendImagePing(const KURL&); | 178 virtual void sendImagePing(const KURL&); |
| 176 virtual void addConsoleMessage(const String&, | 179 virtual void addConsoleMessage(const String&, |
| 177 LogMessageType = LogErrorMessage) const; | 180 LogMessageType = LogErrorMessage) const; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 188 // stored in the FetchContext implementation. | 191 // stored in the FetchContext implementation. |
| 189 virtual void setFirstPartyCookieAndRequestorOrigin(ResourceRequest&); | 192 virtual void setFirstPartyCookieAndRequestorOrigin(ResourceRequest&); |
| 190 | 193 |
| 191 virtual MHTMLArchive* archive() const { return nullptr; } | 194 virtual MHTMLArchive* archive() const { return nullptr; } |
| 192 | 195 |
| 193 virtual ResourceLoadPriority modifyPriorityForExperiments( | 196 virtual ResourceLoadPriority modifyPriorityForExperiments( |
| 194 ResourceLoadPriority priority) { | 197 ResourceLoadPriority priority) { |
| 195 return priority; | 198 return priority; |
| 196 } | 199 } |
| 197 | 200 |
| 201 virtual RefPtr<WebTaskRunner> timerTaskRunner() const { return nullptr; } |
| 198 virtual RefPtr<WebTaskRunner> loadingTaskRunner() const { return nullptr; } | 202 virtual RefPtr<WebTaskRunner> loadingTaskRunner() const { return nullptr; } |
| 199 | 203 |
| 200 PlatformProbeSink* platformProbeSink() const { return m_platformProbeSink; } | 204 PlatformProbeSink* platformProbeSink() const { return m_platformProbeSink; } |
| 201 | 205 |
| 206 virtual Resource::ResourceCallback* resourceCallback() { return nullptr; } |
| 207 |
| 208 virtual WebURLLoader* createURLLoader() { return nullptr; } |
| 209 |
| 202 protected: | 210 protected: |
| 203 FetchContext(); | 211 FetchContext(); |
| 204 | 212 |
| 205 private: | 213 private: |
| 206 Member<PlatformProbeSink> m_platformProbeSink; | 214 Member<PlatformProbeSink> m_platformProbeSink; |
| 207 }; | 215 }; |
| 208 | 216 |
| 209 } // namespace blink | 217 } // namespace blink |
| 210 | 218 |
| 211 #endif | 219 #endif |
| OLD | NEW |