| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 void stopFetching(); | 106 void stopFetching(); |
| 107 bool isFetching() const; | 107 bool isFetching() const; |
| 108 | 108 |
| 109 void didLoadResource(Resource*); | 109 void didLoadResource(Resource*); |
| 110 bool willFollowRedirect(Resource*, ResourceRequest&, const ResourceResponse&
); | 110 bool willFollowRedirect(Resource*, ResourceRequest&, const ResourceResponse&
); |
| 111 void didFinishLoading(Resource*, double finishTime, int64_t encodedDataLengt
h); | 111 void didFinishLoading(Resource*, double finishTime, int64_t encodedDataLengt
h); |
| 112 void didFailLoading(const Resource*, const ResourceError&); | 112 void didFailLoading(const Resource*, const ResourceError&); |
| 113 void didReceiveResponse(const Resource*, const ResourceResponse&); | 113 void didReceiveResponse(const Resource*, const ResourceResponse&); |
| 114 void didReceiveData(const Resource*, const char* data, int dataLength, int e
ncodedDataLength); | 114 void didReceiveData(const Resource*, const char* data, int dataLength, int e
ncodedDataLength); |
| 115 void didDownloadData(const Resource*, int dataLength, int encodedDataLength)
; | 115 void didDownloadData(const Resource*, int dataLength, int encodedDataLength)
; |
| 116 void subresourceLoaderFinishedLoadingOnePart(ResourceLoader*); | |
| 117 void willStartLoadingResource(Resource*, ResourceLoader*, ResourceRequest&); | 116 void willStartLoadingResource(Resource*, ResourceLoader*, ResourceRequest&); |
| 118 bool defersLoading() const; | 117 bool defersLoading() const; |
| 119 | 118 |
| 119 void moveResourceLoaderToNonBlocking(ResourceLoader*); |
| 120 void removeResourceLoader(ResourceLoader*); |
| 121 |
| 120 enum AccessControlLoggingDecision { | 122 enum AccessControlLoggingDecision { |
| 121 ShouldLogAccessControlErrors, | 123 ShouldLogAccessControlErrors, |
| 122 ShouldNotLogAccessControlErrors | 124 ShouldNotLogAccessControlErrors |
| 123 }; | 125 }; |
| 124 bool canAccessResource(Resource*, SecurityOrigin*, const KURL&, AccessContro
lLoggingDecision) const; | 126 bool canAccessResource(Resource*, SecurityOrigin*, const KURL&, AccessContro
lLoggingDecision) const; |
| 125 bool isControlledByServiceWorker() const; | 127 bool isControlledByServiceWorker() const; |
| 126 | 128 |
| 127 void acceptDataFromThreadedReceiver(unsigned long identifier, const char* da
ta, int dataLength, int encodedDataLength); | 129 void acceptDataFromThreadedReceiver(unsigned long identifier, const char* da
ta, int dataLength, int encodedDataLength); |
| 128 | 130 |
| 129 ResourceLoadPriority loadPriority(Resource::Type, const FetchRequest&, Resou
rcePriority::VisibilityStatus = ResourcePriority::NotVisible); | 131 ResourceLoadPriority loadPriority(Resource::Type, const FetchRequest&, Resou
rcePriority::VisibilityStatus = ResourcePriority::NotVisible); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 void moveCachedNonBlockingResourceToBlocking(Resource*, const FetchRequest&)
; | 171 void moveCachedNonBlockingResourceToBlocking(Resource*, const FetchRequest&)
; |
| 170 | 172 |
| 171 void initializeResourceRequest(ResourceRequest&, Resource::Type); | 173 void initializeResourceRequest(ResourceRequest&, Resource::Type); |
| 172 | 174 |
| 173 static bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPo
licy); | 175 static bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPo
licy); |
| 174 | 176 |
| 175 void resourceTimingReportTimerFired(Timer<ResourceFetcher>*); | 177 void resourceTimingReportTimerFired(Timer<ResourceFetcher>*); |
| 176 | 178 |
| 177 void reloadImagesIfNotDeferred(); | 179 void reloadImagesIfNotDeferred(); |
| 178 | 180 |
| 179 void willTerminateResourceLoader(ResourceLoader*); | |
| 180 | |
| 181 void updateMemoryCacheStats(Resource*, RevalidationPolicy, const FetchReques
t&, const ResourceFactory&, bool isStaticData) const; | 181 void updateMemoryCacheStats(Resource*, RevalidationPolicy, const FetchReques
t&, const ResourceFactory&, bool isStaticData) const; |
| 182 | 182 |
| 183 Member<FetchContext> m_context; | 183 Member<FetchContext> m_context; |
| 184 | 184 |
| 185 HashSet<String> m_validatedURLs; | 185 HashSet<String> m_validatedURLs; |
| 186 mutable DocumentResourceMap m_documentResources; | 186 mutable DocumentResourceMap m_documentResources; |
| 187 | 187 |
| 188 OwnPtrWillBeMember<WillBeHeapListHashSet<RefPtrWillBeMember<Resource>>> m_pr
eloads; | 188 OwnPtrWillBeMember<WillBeHeapListHashSet<RefPtrWillBeMember<Resource>>> m_pr
eloads; |
| 189 RefPtrWillBeMember<MHTMLArchive> m_archive; | 189 RefPtrWillBeMember<MHTMLArchive> m_archive; |
| 190 | 190 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 m_loader->m_allowStaleResources = m_previousState; | 239 m_loader->m_allowStaleResources = m_previousState; |
| 240 } | 240 } |
| 241 private: | 241 private: |
| 242 Member<ResourceFetcher> m_loader; | 242 Member<ResourceFetcher> m_loader; |
| 243 bool m_previousState; | 243 bool m_previousState; |
| 244 }; | 244 }; |
| 245 | 245 |
| 246 } // namespace blink | 246 } // namespace blink |
| 247 | 247 |
| 248 #endif // ResourceFetcher_h | 248 #endif // ResourceFetcher_h |
| OLD | NEW |