| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 void setDefersLoading(bool); | 150 void setDefersLoading(bool); |
| 151 void setMainResourceDataBufferingPolicy(DataBufferingPolicy); | 151 void setMainResourceDataBufferingPolicy(DataBufferingPolicy); |
| 152 | 152 |
| 153 void startLoadingMainResource(); | 153 void startLoadingMainResource(); |
| 154 void cancelMainResourceLoad(const ResourceError&); | 154 void cancelMainResourceLoad(const ResourceError&); |
| 155 | 155 |
| 156 bool isLoadingMainResource() const { return m_loadingMainResource; } | 156 bool isLoadingMainResource() const { return m_loadingMainResource; } |
| 157 bool isLoadingMultipartContent() const { return m_isLoadingMultipartCont
ent; } | 157 bool isLoadingMultipartContent() const { return m_isLoadingMultipartCont
ent; } |
| 158 | 158 |
| 159 void stopLoadingSubresources(); | 159 void stopLoadingSubresources(); |
| 160 void addResourceLoader(ResourceLoader*); | 160 void addSubresourceLoader(ResourceLoader*); |
| 161 void removeResourceLoader(ResourceLoader*); | 161 void removeSubresourceLoader(ResourceLoader*); |
| 162 | 162 |
| 163 void subresourceLoaderFinishedLoadingOnePart(ResourceLoader*); | 163 void subresourceLoaderFinishedLoadingOnePart(ResourceLoader*); |
| 164 | 164 |
| 165 void setDeferMainResourceDataLoad(bool defer) { m_deferMainResourceDataL
oad = defer; } | 165 void setDeferMainResourceDataLoad(bool defer) { m_deferMainResourceDataL
oad = defer; } |
| 166 | 166 |
| 167 void didTellClientAboutLoad(const String& url) | 167 void didTellClientAboutLoad(const String& url) |
| 168 { | 168 { |
| 169 // Don't include data urls here, as if a lot of data is loaded | 169 // Don't include data urls here, as if a lot of data is loaded |
| 170 // that way, we hold on to the (large) url string for too long. | 170 // that way, we hold on to the (large) url string for too long. |
| 171 if (protocolIs(url, "data")) | 171 if (protocolIs(url, "data")) |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 void handleSubstituteDataLoadNow(DocumentLoaderTimer*); | 241 void handleSubstituteDataLoadNow(DocumentLoaderTimer*); |
| 242 void startDataLoadTimer(); | 242 void startDataLoadTimer(); |
| 243 | 243 |
| 244 void deliverSubstituteResourcesAfterDelay(); | 244 void deliverSubstituteResourcesAfterDelay(); |
| 245 void substituteResourceDeliveryTimerFired(Timer<DocumentLoader>*); | 245 void substituteResourceDeliveryTimerFired(Timer<DocumentLoader>*); |
| 246 | 246 |
| 247 Frame* m_frame; | 247 Frame* m_frame; |
| 248 RefPtr<CachedResourceLoader> m_cachedResourceLoader; | 248 RefPtr<CachedResourceLoader> m_cachedResourceLoader; |
| 249 | 249 |
| 250 CachedResourceHandle<CachedRawResource> m_mainResource; | 250 CachedResourceHandle<CachedRawResource> m_mainResource; |
| 251 ResourceLoaderSet m_resourceLoaders; | 251 ResourceLoaderSet m_subresourceLoaders; |
| 252 ResourceLoaderSet m_multipartResourceLoaders; | 252 ResourceLoaderSet m_multipartSubresourceLoaders; |
| 253 | 253 |
| 254 mutable DocumentWriter m_writer; | 254 mutable DocumentWriter m_writer; |
| 255 | 255 |
| 256 // A reference to actual request used to create the data source. | 256 // A reference to actual request used to create the data source. |
| 257 // This should only be used by the resourceLoadDelegate's | 257 // This should only be used by the resourceLoadDelegate's |
| 258 // identifierForInitialRequest:fromDatasource: method. It is | 258 // identifierForInitialRequest:fromDatasource: method. It is |
| 259 // not guaranteed to remain unchanged, as requests are mutable. | 259 // not guaranteed to remain unchanged, as requests are mutable. |
| 260 ResourceRequest m_originalRequest; | 260 ResourceRequest m_originalRequest; |
| 261 | 261 |
| 262 SubstituteData m_substituteData; | 262 SubstituteData m_substituteData; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 | 327 |
| 328 inline void DocumentLoader::takeMemoryCacheLoadsForClientNotification(Vector
<String>& loadsSet) | 328 inline void DocumentLoader::takeMemoryCacheLoadsForClientNotification(Vector
<String>& loadsSet) |
| 329 { | 329 { |
| 330 loadsSet.swap(m_resourcesLoadedFromMemoryCacheForClientNotification); | 330 loadsSet.swap(m_resourcesLoadedFromMemoryCacheForClientNotification); |
| 331 m_resourcesLoadedFromMemoryCacheForClientNotification.clear(); | 331 m_resourcesLoadedFromMemoryCacheForClientNotification.clear(); |
| 332 } | 332 } |
| 333 | 333 |
| 334 } | 334 } |
| 335 | 335 |
| 336 #endif // DocumentLoader_h | 336 #endif // DocumentLoader_h |
| OLD | NEW |