OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> | 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> |
4 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 4 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
5 rights reserved. | 5 rights reserved. |
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
7 | 7 |
8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 bool shouldDeferImageLoad(const KURL&) const; | 117 bool shouldDeferImageLoad(const KURL&) const; |
118 | 118 |
119 void recordResourceTimingOnRedirect(Resource*, const ResourceResponse&, bool); | 119 void recordResourceTimingOnRedirect(Resource*, const ResourceResponse&, bool); |
120 | 120 |
121 enum LoaderFinishType { DidFinishLoading, DidFinishFirstPartInMultipart }; | 121 enum LoaderFinishType { DidFinishLoading, DidFinishFirstPartInMultipart }; |
122 void handleLoaderFinish(Resource*, double finishTime, LoaderFinishType); | 122 void handleLoaderFinish(Resource*, double finishTime, LoaderFinishType); |
123 void handleLoaderError(Resource*, const ResourceError&); | 123 void handleLoaderError(Resource*, const ResourceError&); |
124 bool isControlledByServiceWorker() const; | 124 bool isControlledByServiceWorker() const; |
125 | 125 |
126 enum ResourceLoadStartType { | |
127 ResourceLoadingFromNetwork, | |
128 ResourceLoadingFromCache | |
129 }; | |
130 static const ResourceLoaderOptions& defaultResourceOptions(); | 126 static const ResourceLoaderOptions& defaultResourceOptions(); |
131 | 127 |
132 String getCacheIdentifier() const; | 128 String getCacheIdentifier() const; |
133 | 129 |
134 WARN_UNUSED_RESULT static WebURLRequest::RequestContext | 130 WARN_UNUSED_RESULT static WebURLRequest::RequestContext |
135 determineRequestContext(Resource::Type, bool isMainFrame); | 131 determineRequestContext(Resource::Type, bool isMainFrame); |
136 WARN_UNUSED_RESULT WebURLRequest::RequestContext determineRequestContext( | 132 WARN_UNUSED_RESULT WebURLRequest::RequestContext determineRequestContext( |
137 Resource::Type) const; | 133 Resource::Type) const; |
138 | 134 |
139 void updateAllImageResourcePriorities(); | 135 void updateAllImageResourcePriorities(); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 void moveResourceLoaderToNonBlocking(ResourceLoader*); | 193 void moveResourceLoaderToNonBlocking(ResourceLoader*); |
198 void removeResourceLoader(ResourceLoader*); | 194 void removeResourceLoader(ResourceLoader*); |
199 void handleLoadCompletion(Resource*); | 195 void handleLoadCompletion(Resource*); |
200 | 196 |
201 void initializeResourceRequest(ResourceRequest&, | 197 void initializeResourceRequest(ResourceRequest&, |
202 Resource::Type, | 198 Resource::Type, |
203 FetchRequest::DeferOption); | 199 FetchRequest::DeferOption); |
204 void requestLoadStarted(unsigned long identifier, | 200 void requestLoadStarted(unsigned long identifier, |
205 Resource*, | 201 Resource*, |
206 const FetchRequest&, | 202 const FetchRequest&, |
207 ResourceLoadStartType, | 203 RevalidationPolicy, |
208 bool isStaticData = false); | 204 bool isStaticData = false); |
209 | 205 |
| 206 void didLoadResourceFromMemoryCache(unsigned long identifier, |
| 207 Resource*, |
| 208 const ResourceRequest&); |
| 209 |
210 bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPolicy); | 210 bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPolicy); |
211 | 211 |
212 void resourceTimingReportTimerFired(TimerBase*); | 212 void resourceTimingReportTimerFired(TimerBase*); |
213 | 213 |
214 void reloadImagesIfNotDeferred(); | 214 void reloadImagesIfNotDeferred(); |
215 | 215 |
216 void updateMemoryCacheStats(Resource*, | 216 void updateMemoryCacheStats(Resource*, |
217 RevalidationPolicy, | 217 RevalidationPolicy, |
218 const FetchRequest&, | 218 const FetchRequest&, |
219 const ResourceFactory&, | 219 const ResourceFactory&, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } | 284 } |
285 | 285 |
286 private: | 286 private: |
287 Member<ResourceFetcher> m_loader; | 287 Member<ResourceFetcher> m_loader; |
288 bool m_previousState; | 288 bool m_previousState; |
289 }; | 289 }; |
290 | 290 |
291 } // namespace blink | 291 } // namespace blink |
292 | 292 |
293 #endif // ResourceFetcher_h | 293 #endif // ResourceFetcher_h |
OLD | NEW |