| 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 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 void setTriggeringAction(const NavigationAction& action) { m_triggeringA
ction = action; } | 149 void setTriggeringAction(const NavigationAction& action) { m_triggeringA
ction = action; } |
| 150 void setOverrideEncoding(const String& encoding) { m_overrideEncoding =
encoding; } | 150 void setOverrideEncoding(const String& encoding) { m_overrideEncoding =
encoding; } |
| 151 void setLastCheckedRequest(const ResourceRequest& request) { m_lastCheck
edRequest = request; } | 151 void setLastCheckedRequest(const ResourceRequest& request) { m_lastCheck
edRequest = request; } |
| 152 const ResourceRequest& lastCheckedRequest() { return m_lastCheckedReque
st; } | 152 const ResourceRequest& lastCheckedRequest() { return m_lastCheckedReque
st; } |
| 153 | 153 |
| 154 void stopRecordingResponses(); | 154 void stopRecordingResponses(); |
| 155 const String& title() const { return m_pageTitle; } | 155 const String& title() const { return m_pageTitle; } |
| 156 | 156 |
| 157 KURL urlForHistory() const; | 157 KURL urlForHistory() const; |
| 158 bool urlForHistoryReflectsFailure() const; | 158 bool urlForHistoryReflectsFailure() const; |
| 159 bool urlForHistoryReflectsServerRedirect() const { return urlForHistory(
) != url(); } | 159 |
| 160 bool urlForHistoryReflectsClientRedirect() const { return m_urlForHistor
yReflectsClientRedirect; } | 160 // These accessors accomodate WebCore's somewhat fickle custom of creati
ng history |
| 161 void setURLForHistoryReflectsClientRedirect(bool b) { m_urlForHistoryRef
lectsClientRedirect = b; } | 161 // items for redirects, but only sometimes. For "source" and "destinatio
n", |
| 162 // these accessors return the URL that would have been used if a history |
| 163 // item were created. This allows WebKit to link history items reflectin
g |
| 164 // redirects into a chain from start to finish. |
| 165 String clientRedirectSourceForHistory() const { return m_clientRedirectS
ourceForHistory; } // null if no client redirect occurred. |
| 166 String clientRedirectDestinationForHistory() const { return urlForHistor
y(); } |
| 167 void setClientRedirectSourceForHistory(const String& clientedirectSource
ForHistory) { m_clientRedirectSourceForHistory = clientedirectSourceForHistory;
} |
| 168 |
| 169 String serverRedirectSourceForHistory() const { return urlForHistory() =
= url() ? String() : urlForHistory(); } // null if no server redirect occurred. |
| 170 String serverRedirectDestinationForHistory() const { return url(); } |
| 171 |
| 172 bool didCreateGlobalHistoryEntry() const { return m_didCreateGlobalHisto
ryEntry; } |
| 173 void setDidCreateGlobalHistoryEntry(bool didCreateGlobalHistoryEntry) {
m_didCreateGlobalHistoryEntry = didCreateGlobalHistoryEntry; } |
| 162 | 174 |
| 163 void loadFromCachedPage(PassRefPtr<CachedPage>); | 175 void loadFromCachedPage(PassRefPtr<CachedPage>); |
| 164 void setLoadingFromCachedPage(bool loading) { m_loadingFromCachedPage =
loading; } | 176 void setLoadingFromCachedPage(bool loading) { m_loadingFromCachedPage =
loading; } |
| 165 bool isLoadingFromCachedPage() const { return m_loadingFromCachedPage; } | 177 bool isLoadingFromCachedPage() const { return m_loadingFromCachedPage; } |
| 166 | 178 |
| 167 void setDefersLoading(bool); | 179 void setDefersLoading(bool); |
| 168 | 180 |
| 169 bool startLoadingMainResource(unsigned long identifier); | 181 bool startLoadingMainResource(unsigned long identifier); |
| 170 void cancelMainResourceLoad(const ResourceError&); | 182 void cancelMainResourceLoad(const ResourceError&); |
| 171 | 183 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 typedef HashMap<RefPtr<ResourceLoader>, RefPtr<SubstituteResource> > Sub
stituteResourceMap; | 296 typedef HashMap<RefPtr<ResourceLoader>, RefPtr<SubstituteResource> > Sub
stituteResourceMap; |
| 285 SubstituteResourceMap m_pendingSubstituteResources; | 297 SubstituteResourceMap m_pendingSubstituteResources; |
| 286 Timer<DocumentLoader> m_substituteResourceDeliveryTimer; | 298 Timer<DocumentLoader> m_substituteResourceDeliveryTimer; |
| 287 | 299 |
| 288 OwnPtr<ArchiveResourceCollection> m_archiveResourceCollection; | 300 OwnPtr<ArchiveResourceCollection> m_archiveResourceCollection; |
| 289 RefPtr<SharedBuffer> m_parsedArchiveData; | 301 RefPtr<SharedBuffer> m_parsedArchiveData; |
| 290 | 302 |
| 291 HashSet<String> m_resourcesClientKnowsAbout; | 303 HashSet<String> m_resourcesClientKnowsAbout; |
| 292 Vector<String> m_resourcesLoadedFromMemoryCacheForClientNotification; | 304 Vector<String> m_resourcesLoadedFromMemoryCacheForClientNotification; |
| 293 | 305 |
| 294 bool m_urlForHistoryReflectsClientRedirect; | 306 String m_clientRedirectSourceForHistory; |
| 307 bool m_didCreateGlobalHistoryEntry; |
| 295 | 308 |
| 296 #if ENABLE(OFFLINE_WEB_APPLICATIONS) | 309 #if ENABLE(OFFLINE_WEB_APPLICATIONS) |
| 297 // The application cache that the document loader is associated with (if
any). | 310 // The application cache that the document loader is associated with (if
any). |
| 298 RefPtr<ApplicationCache> m_applicationCache; | 311 RefPtr<ApplicationCache> m_applicationCache; |
| 299 | 312 |
| 300 // Before an application cache has finished loading, this will be the ca
ndidate application | 313 // Before an application cache has finished loading, this will be the ca
ndidate application |
| 301 // group that the document loader is associated with. | 314 // group that the document loader is associated with. |
| 302 ApplicationCacheGroup* m_candidateApplicationCacheGroup; | 315 ApplicationCacheGroup* m_candidateApplicationCacheGroup; |
| 303 | 316 |
| 304 // Once the main resource has finished loading, this is the application
cache it was loaded from (if any). | 317 // Once the main resource has finished loading, this is the application
cache it was loaded from (if any). |
| 305 RefPtr<ApplicationCache> m_mainResourceApplicationCache; | 318 RefPtr<ApplicationCache> m_mainResourceApplicationCache; |
| 306 #endif | 319 #endif |
| 307 }; | 320 }; |
| 308 | 321 |
| 309 inline void DocumentLoader::recordMemoryCacheLoadForFutureClientNotification
(const String& url) | 322 inline void DocumentLoader::recordMemoryCacheLoadForFutureClientNotification
(const String& url) |
| 310 { | 323 { |
| 311 m_resourcesLoadedFromMemoryCacheForClientNotification.append(url); | 324 m_resourcesLoadedFromMemoryCacheForClientNotification.append(url); |
| 312 } | 325 } |
| 313 | 326 |
| 314 inline void DocumentLoader::takeMemoryCacheLoadsForClientNotification(Vector
<String>& loadsSet) | 327 inline void DocumentLoader::takeMemoryCacheLoadsForClientNotification(Vector
<String>& loadsSet) |
| 315 { | 328 { |
| 316 loadsSet.swap(m_resourcesLoadedFromMemoryCacheForClientNotification); | 329 loadsSet.swap(m_resourcesLoadedFromMemoryCacheForClientNotification); |
| 317 m_resourcesLoadedFromMemoryCacheForClientNotification.clear(); | 330 m_resourcesLoadedFromMemoryCacheForClientNotification.clear(); |
| 318 } | 331 } |
| 319 | 332 |
| 320 } | 333 } |
| 321 | 334 |
| 322 #endif // DocumentLoader_h | 335 #endif // DocumentLoader_h |
| OLD | NEW |