summaryrefslogtreecommitdiffstats
path: root/WebCore/loader/DocumentLoader.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/loader/DocumentLoader.h
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/loader/DocumentLoader.h')
-rw-r--r--WebCore/loader/DocumentLoader.h43
1 files changed, 30 insertions, 13 deletions
diff --git a/WebCore/loader/DocumentLoader.h b/WebCore/loader/DocumentLoader.h
index aef4f49..85cceef 100644
--- a/WebCore/loader/DocumentLoader.h
+++ b/WebCore/loader/DocumentLoader.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,25 +29,18 @@
#ifndef DocumentLoader_h
#define DocumentLoader_h
-#include "IconDatabase.h"
#include "NavigationAction.h"
-#include <wtf/RefCounted.h>
-#include "PlatformString.h"
#include "ResourceError.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
#include "SubstituteData.h"
-#include <wtf/HashSet.h>
-#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
+#include "Timer.h"
namespace WebCore {
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
class ApplicationCache;
class ApplicationCacheGroup;
class ApplicationCacheResource;
-#endif
#if ENABLE(ARCHIVE) // ANDROID extension: disabled to reduce code size
class Archive;
class ArchiveResource;
@@ -56,13 +49,10 @@ namespace WebCore {
class CachedPage;
class Frame;
class FrameLoader;
- class HistoryItem;
- class KURL;
class MainResourceLoader;
class ResourceLoader;
class SchedulePair;
class SharedBuffer;
- class SubstituteData;
class SubstituteResource;
typedef HashSet<RefPtr<ResourceLoader> > ResourceLoaderSet;
@@ -167,7 +157,12 @@ namespace WebCore {
void stopRecordingResponses();
const String& title() const { return m_pageTitle; }
+
KURL urlForHistory() const;
+ bool urlForHistoryReflectsFailure() const;
+ bool urlForHistoryReflectsServerRedirect() const { return urlForHistory() != url(); }
+ bool urlForHistoryReflectsClientRedirect() const { return m_urlForHistoryReflectsClientRedirect; }
+ void setURLForHistoryReflectsClientRedirect(bool b) { m_urlForHistoryReflectsClientRedirect = b; }
void loadFromCachedPage(PassRefPtr<CachedPage>);
void setLoadingFromCachedPage(bool loading) { m_loadingFromCachedPage = loading; }
@@ -198,16 +193,22 @@ namespace WebCore {
void setDeferMainResourceDataLoad(bool defer) { m_deferMainResourceDataLoad = defer; }
bool deferMainResourceDataLoad() const { return m_deferMainResourceDataLoad; }
+ void didTellClientAboutLoad(const String& url) { m_resourcesClientKnowsAbout.add(url); }
+ bool haveToldClientAboutLoad(const String& url) { return m_resourcesClientKnowsAbout.contains(url); }
+ void recordMemoryCacheLoadForFutureClientNotification(const String& url);
+ void takeMemoryCacheLoadsForClientNotification(Vector<String>& loads);
+
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
bool scheduleApplicationCacheLoad(ResourceLoader*, const ResourceRequest&, const KURL& originalURL);
+ bool scheduleLoadFallbackResourceFromApplicationCache(ResourceLoader*, const ResourceRequest&, ApplicationCache* = 0);
bool shouldLoadResourceFromApplicationCache(const ResourceRequest&, ApplicationCacheResource*&);
+ bool getApplicationCacheFallbackResource(const ResourceRequest&, ApplicationCacheResource*&, ApplicationCache* = 0);
void setCandidateApplicationCacheGroup(ApplicationCacheGroup* group);
ApplicationCacheGroup* candidateApplicationCacheGroup() const { return m_candidateApplicationCacheGroup; }
void setApplicationCache(PassRefPtr<ApplicationCache> applicationCache);
ApplicationCache* applicationCache() const { return m_applicationCache.get(); }
- ApplicationCache* topLevelApplicationCache() const;
ApplicationCache* mainResourceApplicationCache() const;
#endif
@@ -292,7 +293,12 @@ namespace WebCore {
OwnPtr<ArchiveResourceCollection> m_archiveResourceCollection;
RefPtr<SharedBuffer> m_parsedArchiveData;
#endif
+
+ HashSet<String> m_resourcesClientKnowsAbout;
+ Vector<String> m_resourcesLoadedFromMemoryCacheForClientNotification;
+ bool m_urlForHistoryReflectsClientRedirect;
+
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
// The application cache that the document loader is associated with (if any).
RefPtr<ApplicationCache> m_applicationCache;
@@ -306,6 +312,17 @@ namespace WebCore {
#endif
};
+ inline void DocumentLoader::recordMemoryCacheLoadForFutureClientNotification(const String& url)
+ {
+ m_resourcesLoadedFromMemoryCacheForClientNotification.append(url);
+ }
+
+ inline void DocumentLoader::takeMemoryCacheLoadsForClientNotification(Vector<String>& loadsSet)
+ {
+ loadsSet.swap(m_resourcesLoadedFromMemoryCacheForClientNotification);
+ m_resourcesLoadedFromMemoryCacheForClientNotification.clear();
+ }
+
}
#endif // DocumentLoader_h