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 { kFetchMainResource, kFetchSubresource }; | 58 enum FetchResourceType { kFetchMainResource, kFetchSubresource }; |
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::kOther; | 163 return ResourceRequestBlockedReason::kOther; |
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 = kLogErrorMessage) const; | 180 LogMessageType = kLogErrorMessage) 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* GetPlatformProbeSink() const { | 204 PlatformProbeSink* GetPlatformProbeSink() const { |
201 return platform_probe_sink_; | 205 return platform_probe_sink_; |
202 } | 206 } |
203 | 207 |
| 208 virtual Resource::ResourceCallback* GetResourceCallback() { return nullptr; } |
| 209 |
| 210 virtual WebURLLoader* CreateURLLoader() { return nullptr; } |
| 211 |
204 protected: | 212 protected: |
205 FetchContext(); | 213 FetchContext(); |
206 | 214 |
207 private: | 215 private: |
208 Member<PlatformProbeSink> platform_probe_sink_; | 216 Member<PlatformProbeSink> platform_probe_sink_; |
209 }; | 217 }; |
210 | 218 |
211 } // namespace blink | 219 } // namespace blink |
212 | 220 |
213 #endif | 221 #endif |
OLD | NEW |