| 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
rights reserved. | 4 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 5 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 5 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 6 | 6 |
| 7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
| 8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
| 9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
| 10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 void stopFetching(); | 107 void stopFetching(); |
| 108 bool isFetching() const; | 108 bool isFetching() const; |
| 109 | 109 |
| 110 bool willFollowRedirect(Resource*, ResourceRequest&, const ResourceResponse&
, int64_t encodedDataLength); | 110 bool willFollowRedirect(Resource*, ResourceRequest&, const ResourceResponse&
, int64_t encodedDataLength); |
| 111 enum DidFinishLoadingReason { | 111 enum DidFinishLoadingReason { |
| 112 DidFinishLoading, | 112 DidFinishLoading, |
| 113 DidFinishFirstPartInMultipart | 113 DidFinishFirstPartInMultipart |
| 114 }; | 114 }; |
| 115 void didFinishLoading(Resource*, double finishTime, int64_t encodedDataLengt
h, DidFinishLoadingReason); | 115 void didFinishLoading(Resource*, double finishTime, int64_t encodedDataLengt
h, DidFinishLoadingReason); |
| 116 void didFailLoading(Resource*, const ResourceError&); | 116 void didFailLoading(Resource*, const ResourceError&); |
| 117 void didReceiveResponse(Resource*, const ResourceResponse&); | 117 void didReceiveResponse(Resource*, const ResourceResponse&, WebDataConsumerH
andle*); |
| 118 void didReceiveData(const Resource*, const char* data, int dataLength, int e
ncodedDataLength); | 118 void didReceiveData(const Resource*, const char* data, int dataLength, int e
ncodedDataLength); |
| 119 void didDownloadData(const Resource*, int dataLength, int encodedDataLength)
; | 119 void didDownloadData(const Resource*, int dataLength, int encodedDataLength)
; |
| 120 bool defersLoading() const; | 120 bool defersLoading() const; |
| 121 | |
| 122 bool canAccessResource(Resource*, SecurityOrigin*, const KURL&) const; | |
| 123 bool isControlledByServiceWorker() const; | 121 bool isControlledByServiceWorker() const; |
| 124 | 122 |
| 125 void acceptDataFromThreadedReceiver(unsigned long identifier, const char* da
ta, int dataLength, int encodedDataLength); | 123 void acceptDataFromThreadedReceiver(unsigned long identifier, const char* da
ta, int dataLength, int encodedDataLength); |
| 126 | 124 |
| 127 ResourceLoadPriority loadPriority(Resource::Type, const FetchRequest&, Resou
rcePriority::VisibilityStatus = ResourcePriority::NotVisible); | 125 ResourceLoadPriority loadPriority(Resource::Type, const FetchRequest&, Resou
rcePriority::VisibilityStatus = ResourcePriority::NotVisible); |
| 128 | 126 |
| 129 enum ResourceLoadStartType { | 127 enum ResourceLoadStartType { |
| 130 ResourceLoadingFromNetwork, | 128 ResourceLoadingFromNetwork, |
| 131 ResourceLoadingFromCache | 129 ResourceLoadingFromCache |
| 132 }; | 130 }; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 159 // RevalidationPolicy enum values are used in UMAs https://crbug.com/579496. | 157 // RevalidationPolicy enum values are used in UMAs https://crbug.com/579496. |
| 160 enum RevalidationPolicy { Use, Revalidate, Reload, Load }; | 158 enum RevalidationPolicy { Use, Revalidate, Reload, Load }; |
| 161 RevalidationPolicy determineRevalidationPolicy(Resource::Type, const FetchRe
quest&, Resource* existingResource, bool isStaticData) const; | 159 RevalidationPolicy determineRevalidationPolicy(Resource::Type, const FetchRe
quest&, Resource* existingResource, bool isStaticData) const; |
| 162 | 160 |
| 163 void moveCachedNonBlockingResourceToBlocking(Resource*, const FetchRequest&)
; | 161 void moveCachedNonBlockingResourceToBlocking(Resource*, const FetchRequest&)
; |
| 164 void moveResourceLoaderToNonBlocking(ResourceLoader*); | 162 void moveResourceLoaderToNonBlocking(ResourceLoader*); |
| 165 void removeResourceLoader(ResourceLoader*); | 163 void removeResourceLoader(ResourceLoader*); |
| 166 | 164 |
| 167 void initializeResourceRequest(ResourceRequest&, Resource::Type, FetchReques
t::DeferOption); | 165 void initializeResourceRequest(ResourceRequest&, Resource::Type, FetchReques
t::DeferOption); |
| 168 void willSendRequest(unsigned long identifier, ResourceRequest&, const Resou
rceResponse&, const ResourceLoaderOptions&); | 166 void willSendRequest(unsigned long identifier, ResourceRequest&, const Resou
rceResponse&, const ResourceLoaderOptions&); |
| 167 bool canAccessResponse(Resource*, const ResourceResponse&) const; |
| 169 | 168 |
| 170 bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPolicy); | 169 bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPolicy); |
| 171 bool shouldDeferImageLoad(const KURL&) const; | 170 bool shouldDeferImageLoad(const KURL&) const; |
| 172 | 171 |
| 173 void resourceTimingReportTimerFired(TimerBase*); | 172 void resourceTimingReportTimerFired(TimerBase*); |
| 174 | 173 |
| 175 void reloadImagesIfNotDeferred(); | 174 void reloadImagesIfNotDeferred(); |
| 176 | 175 |
| 177 void updateMemoryCacheStats(Resource*, RevalidationPolicy, const FetchReques
t&, const ResourceFactory&, bool isStaticData) const; | 176 void updateMemoryCacheStats(Resource*, RevalidationPolicy, const FetchReques
t&, const ResourceFactory&, bool isStaticData) const; |
| 178 | 177 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 m_loader->m_allowStaleResources = m_previousState; | 235 m_loader->m_allowStaleResources = m_previousState; |
| 237 } | 236 } |
| 238 private: | 237 private: |
| 239 Member<ResourceFetcher> m_loader; | 238 Member<ResourceFetcher> m_loader; |
| 240 bool m_previousState; | 239 bool m_previousState; |
| 241 }; | 240 }; |
| 242 | 241 |
| 243 } // namespace blink | 242 } // namespace blink |
| 244 | 243 |
| 245 #endif // ResourceFetcher_h | 244 #endif // ResourceFetcher_h |
| OLD | NEW |