| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2009, Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef ApplicationCacheHost_h | 31 #ifndef ApplicationCacheHost_h |
| 32 #define ApplicationCacheHost_h | 32 #define ApplicationCacheHost_h |
| 33 | 33 |
| 34 #include "platform/heap/Handle.h" | 34 #include "platform/heap/Handle.h" |
| 35 #include "platform/weborigin/KURL.h" | 35 #include "platform/weborigin/KURL.h" |
| 36 #include "public/platform/WebApplicationCacheHostClient.h" | 36 #include "public/platform/WebApplicationCacheHostClient.h" |
| 37 #include "wtf/Allocator.h" |
| 37 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" |
| 38 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
| 39 | 40 |
| 40 namespace blink { | 41 namespace blink { |
| 41 class ApplicationCache; | 42 class ApplicationCache; |
| 42 class DocumentLoader; | 43 class DocumentLoader; |
| 43 class ResourceRequest; | 44 class ResourceRequest; |
| 44 class ResourceResponse; | 45 class ResourceResponse; |
| 45 | 46 |
| 46 class ApplicationCacheHost final : public GarbageCollectedFinalized<Applicat
ionCacheHost>, public WebApplicationCacheHostClient { | 47 class ApplicationCacheHost final : public GarbageCollectedFinalized<Applicat
ionCacheHost>, public WebApplicationCacheHostClient { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 69 ERROR_EVENT, | 70 ERROR_EVENT, |
| 70 NOUPDATE_EVENT, | 71 NOUPDATE_EVENT, |
| 71 DOWNLOADING_EVENT, | 72 DOWNLOADING_EVENT, |
| 72 PROGRESS_EVENT, | 73 PROGRESS_EVENT, |
| 73 UPDATEREADY_EVENT, | 74 UPDATEREADY_EVENT, |
| 74 CACHED_EVENT, | 75 CACHED_EVENT, |
| 75 OBSOLETE_EVENT // Must remain the last value, this is used to size
arrays. | 76 OBSOLETE_EVENT // Must remain the last value, this is used to size
arrays. |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 struct CacheInfo { | 79 struct CacheInfo { |
| 80 STACK_ALLOCATED(); |
| 79 CacheInfo(const KURL& manifest, double creationTime, double updateTi
me, long long size) | 81 CacheInfo(const KURL& manifest, double creationTime, double updateTi
me, long long size) |
| 80 : m_manifest(manifest) | 82 : m_manifest(manifest) |
| 81 , m_creationTime(creationTime) | 83 , m_creationTime(creationTime) |
| 82 , m_updateTime(updateTime) | 84 , m_updateTime(updateTime) |
| 83 , m_size(size) { } | 85 , m_size(size) { } |
| 84 KURL m_manifest; | 86 KURL m_manifest; |
| 85 double m_creationTime; | 87 double m_creationTime; |
| 86 double m_updateTime; | 88 double m_updateTime; |
| 87 long long m_size; | 89 long long m_size; |
| 88 }; | 90 }; |
| 89 | 91 |
| 90 struct ResourceInfo { | 92 struct ResourceInfo { |
| 93 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 91 ResourceInfo(const KURL& resource, bool isMaster, bool isManifest, b
ool isFallback, bool isForeign, bool isExplicit, long long size) | 94 ResourceInfo(const KURL& resource, bool isMaster, bool isManifest, b
ool isFallback, bool isForeign, bool isExplicit, long long size) |
| 92 : m_resource(resource) | 95 : m_resource(resource) |
| 93 , m_isMaster(isMaster) | 96 , m_isMaster(isMaster) |
| 94 , m_isManifest(isManifest) | 97 , m_isManifest(isManifest) |
| 95 , m_isFallback(isFallback) | 98 , m_isFallback(isFallback) |
| 96 , m_isForeign(isForeign) | 99 , m_isForeign(isForeign) |
| 97 , m_isExplicit(isExplicit) | 100 , m_isExplicit(isExplicit) |
| 98 , m_size(size) { } | 101 , m_size(size) { } |
| 99 KURL m_resource; | 102 KURL m_resource; |
| 100 bool m_isMaster; | 103 bool m_isMaster; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 Vector<DeferredEvent> m_deferredEvents; | 174 Vector<DeferredEvent> m_deferredEvents; |
| 172 | 175 |
| 173 void dispatchDOMEvent(EventID, int progressTotal, int progressDone, WebA
pplicationCacheHost::ErrorReason, const String& errorURL, int errorStatus, const
String& errorMessage); | 176 void dispatchDOMEvent(EventID, int progressTotal, int progressDone, WebA
pplicationCacheHost::ErrorReason, const String& errorURL, int errorStatus, const
String& errorMessage); |
| 174 | 177 |
| 175 OwnPtr<WebApplicationCacheHost> m_host; | 178 OwnPtr<WebApplicationCacheHost> m_host; |
| 176 }; | 179 }; |
| 177 | 180 |
| 178 } // namespace blink | 181 } // namespace blink |
| 179 | 182 |
| 180 #endif // ApplicationCacheHost_h | 183 #endif // ApplicationCacheHost_h |
| OLD | NEW |