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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 195 |
200 void initializeResourceRequest(ResourceRequest&, | 196 void initializeResourceRequest(ResourceRequest&, |
201 Resource::Type, | 197 Resource::Type, |
202 FetchRequest::DeferOption); | 198 FetchRequest::DeferOption); |
203 void requestLoadStarted(unsigned long identifier, | 199 void requestLoadStarted(unsigned long identifier, |
204 Resource*, | 200 Resource*, |
205 const FetchRequest&, | 201 const FetchRequest&, |
206 ResourceLoadStartType, | 202 ResourceLoadStartType, |
207 bool isStaticData = false); | 203 bool isStaticData = false); |
208 | 204 |
| 205 void didLoadResourceFromMemoryCache(unsigned long identifier, |
| 206 Resource*, |
| 207 const FetchRequest&); |
| 208 |
209 bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPolicy); | 209 bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPolicy); |
210 | 210 |
211 void resourceTimingReportTimerFired(TimerBase*); | 211 void resourceTimingReportTimerFired(TimerBase*); |
212 | 212 |
213 void reloadImagesIfNotDeferred(); | 213 void reloadImagesIfNotDeferred(); |
214 | 214 |
215 void updateMemoryCacheStats(Resource*, | 215 void updateMemoryCacheStats(Resource*, |
216 RevalidationPolicy, | 216 RevalidationPolicy, |
217 const FetchRequest&, | 217 const FetchRequest&, |
218 const ResourceFactory&, | 218 const ResourceFactory&, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 } | 283 } |
284 | 284 |
285 private: | 285 private: |
286 Member<ResourceFetcher> m_loader; | 286 Member<ResourceFetcher> m_loader; |
287 bool m_previousState; | 287 bool m_previousState; |
288 }; | 288 }; |
289 | 289 |
290 } // namespace blink | 290 } // namespace blink |
291 | 291 |
292 #endif // ResourceFetcher_h | 292 #endif // ResourceFetcher_h |
OLD | NEW |