diff options
Diffstat (limited to 'WebCore/loader/appcache/ApplicationCacheGroup.h')
-rw-r--r-- | WebCore/loader/appcache/ApplicationCacheGroup.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/WebCore/loader/appcache/ApplicationCacheGroup.h b/WebCore/loader/appcache/ApplicationCacheGroup.h index 9b8a6ab..b5cdf7b 100644 --- a/WebCore/loader/appcache/ApplicationCacheGroup.h +++ b/WebCore/loader/appcache/ApplicationCacheGroup.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. + * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,10 +28,6 @@ #if ENABLE(OFFLINE_WEB_APPLICATIONS) -#include <wtf/Noncopyable.h> -#include <wtf/HashMap.h> -#include <wtf/HashSet.h> - #include "DOMApplicationCache.h" #include "KURL.h" #include "PlatformString.h" @@ -39,6 +35,10 @@ #include "ResourceHandleClient.h" #include "SharedBuffer.h" +#include <wtf/Noncopyable.h> +#include <wtf/HashMap.h> +#include <wtf/HashSet.h> + namespace WebCore { class ApplicationCache; @@ -46,6 +46,7 @@ class ApplicationCacheResource; class Document; class DocumentLoader; class Frame; +class SecurityOrigin; enum ApplicationCacheUpdateOption { ApplicationCacheUpdateWithBrowsingContext, @@ -66,6 +67,7 @@ public: static void selectCacheWithoutManifestURL(Frame*); const KURL& manifestURL() const { return m_manifestURL; } + const SecurityOrigin* origin() const { return m_origin.get(); } UpdateStatus updateStatus() const { return m_updateStatus; } void setUpdateStatus(UpdateStatus status); @@ -98,6 +100,7 @@ private: static void postListenerTask(ApplicationCacheHost::EventID, int progressTotal, int progressDone, DocumentLoader*); void scheduleReachedMaxAppCacheSizeCallback(); + void scheduleReachedOriginQuotaCallback(); PassRefPtr<ResourceHandle> createResourceHandle(const KURL&, ApplicationCacheResource* newestCachedResource); @@ -117,11 +120,13 @@ private: void didReceiveManifestData(const char*, int); void didFinishLoadingManifest(); void didReachMaxAppCacheSize(); + void didReachOriginQuota(PassRefPtr<Frame> frame); void startLoadingEntry(); void deliverDelayedMainResources(); void checkIfLoadIsComplete(); void cacheUpdateFailed(); + void cacheUpdateFailedDueToOriginQuota(); void manifestNotFound(); void addEntry(const String&, unsigned type); @@ -131,6 +136,7 @@ private: void stopLoading(); KURL m_manifestURL; + RefPtr<SecurityOrigin> m_origin; UpdateStatus m_updateStatus; // This is the newest complete cache in the group. @@ -194,7 +200,12 @@ private: RefPtr<ApplicationCacheResource> m_manifestResource; RefPtr<ResourceHandle> m_manifestHandle; + int64_t m_loadedSize; + int64_t m_availableSpaceInQuota; + bool m_originQuotaReached; + friend class ChromeClientCallbackTimer; + friend class OriginQuotaReachedCallbackTimer; }; } // namespace WebCore |