| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 static ApplicationCacheHost* create(DocumentLoader* loader) | 50 static ApplicationCacheHost* create(DocumentLoader* loader) |
| 51 { | 51 { |
| 52 return new ApplicationCacheHost(loader); | 52 return new ApplicationCacheHost(loader); |
| 53 } | 53 } |
| 54 | 54 |
| 55 virtual ~ApplicationCacheHost(); | 55 virtual ~ApplicationCacheHost(); |
| 56 void detachFromDocumentLoader(); | 56 void detachFromDocumentLoader(); |
| 57 | 57 |
| 58 // The Status numeric values are specified in the HTML5 spec. | 58 // The Status numeric values are specified in the HTML5 spec. |
| 59 enum Status { | 59 enum Status { |
| 60 UNCACHED = 0, | 60 kUncached = 0, |
| 61 IDLE = 1, | 61 kIdle = 1, |
| 62 CHECKING = 2, | 62 kChecking = 2, |
| 63 DOWNLOADING = 3, | 63 kDownloading = 3, |
| 64 UPDATEREADY = 4, | 64 kUpdateready = 4, |
| 65 OBSOLETE = 5 | 65 kObsolete = 5 |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 enum EventID { | 68 enum EventID { |
| 69 CHECKING_EVENT = 0, | 69 kCheckingEvent = 0, |
| 70 ERROR_EVENT, | 70 kErrorEvent, |
| 71 NOUPDATE_EVENT, | 71 kNoupdateEvent, |
| 72 DOWNLOADING_EVENT, | 72 kDownloadingEvent, |
| 73 PROGRESS_EVENT, | 73 kProgressEvent, |
| 74 UPDATEREADY_EVENT, | 74 kUpdatereadyEvent, |
| 75 CACHED_EVENT, | 75 kCachedEvent, |
| 76 OBSOLETE_EVENT // Must remain the last value, this is used to size
arrays. | 76 kObsoleteEvent // Must remain the last value, this is used to size a
rrays. |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 struct CacheInfo { | 79 struct CacheInfo { |
| 80 STACK_ALLOCATED(); | 80 STACK_ALLOCATED(); |
| 81 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) |
| 82 : m_manifest(manifest) | 82 : m_manifest(manifest) |
| 83 , m_creationTime(creationTime) | 83 , m_creationTime(creationTime) |
| 84 , m_updateTime(updateTime) | 84 , m_updateTime(updateTime) |
| 85 , m_size(size) { } | 85 , m_size(size) { } |
| 86 KURL m_manifest; | 86 KURL m_manifest; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 Vector<DeferredEvent> m_deferredEvents; | 174 Vector<DeferredEvent> m_deferredEvents; |
| 175 | 175 |
| 176 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); |
| 177 | 177 |
| 178 std::unique_ptr<WebApplicationCacheHost> m_host; | 178 std::unique_ptr<WebApplicationCacheHost> m_host; |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace blink | 181 } // namespace blink |
| 182 | 182 |
| 183 #endif // ApplicationCacheHost_h | 183 #endif // ApplicationCacheHost_h |
| OLD | NEW |