| 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 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 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 <memory> | 34 #include <memory> |
| 35 #include "base/gtest_prod_util.h" |
| 36 #include "core/CoreExport.h" |
| 35 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
| 36 #include "platform/weborigin/KURL.h" | 38 #include "platform/weborigin/KURL.h" |
| 37 #include "platform/wtf/Allocator.h" | 39 #include "platform/wtf/Allocator.h" |
| 38 #include "platform/wtf/Vector.h" | 40 #include "platform/wtf/Vector.h" |
| 39 #include "public/platform/WebApplicationCacheHostClient.h" | 41 #include "public/platform/WebApplicationCacheHostClient.h" |
| 40 | 42 |
| 41 namespace blink { | 43 namespace blink { |
| 42 class ApplicationCache; | 44 class ApplicationCache; |
| 43 class DocumentLoader; | 45 class DocumentLoader; |
| 44 class ResourceRequest; | 46 class ResourceRequest; |
| 45 class ResourceResponse; | 47 class ResourceResponse; |
| 46 | 48 |
| 47 class ApplicationCacheHost final | 49 class CORE_EXPORT ApplicationCacheHost final |
| 48 : public GarbageCollectedFinalized<ApplicationCacheHost>, | 50 : public GarbageCollectedFinalized<ApplicationCacheHost>, |
| 49 public WebApplicationCacheHostClient { | 51 NON_EXPORTED_BASE(public WebApplicationCacheHostClient) { |
| 50 WTF_MAKE_NONCOPYABLE(ApplicationCacheHost); | 52 WTF_MAKE_NONCOPYABLE(ApplicationCacheHost); |
| 51 | 53 |
| 52 public: | 54 public: |
| 53 static ApplicationCacheHost* Create(DocumentLoader* loader) { | 55 static ApplicationCacheHost* Create(DocumentLoader* loader) { |
| 54 return new ApplicationCacheHost(loader); | 56 return new ApplicationCacheHost(loader); |
| 55 } | 57 } |
| 56 | 58 |
| 57 virtual ~ApplicationCacheHost(); | 59 virtual ~ApplicationCacheHost(); |
| 58 void DetachFromDocumentLoader(); | 60 void DetachFromDocumentLoader(); |
| 59 | 61 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 209 |
| 208 void DispatchDOMEvent(EventID, | 210 void DispatchDOMEvent(EventID, |
| 209 int progress_total, | 211 int progress_total, |
| 210 int progress_done, | 212 int progress_done, |
| 211 WebApplicationCacheHost::ErrorReason, | 213 WebApplicationCacheHost::ErrorReason, |
| 212 const String& error_url, | 214 const String& error_url, |
| 213 int error_status, | 215 int error_status, |
| 214 const String& error_message); | 216 const String& error_message); |
| 215 | 217 |
| 216 std::unique_ptr<WebApplicationCacheHost> host_; | 218 std::unique_ptr<WebApplicationCacheHost> host_; |
| 219 |
| 220 FRIEND_TEST_ALL_PREFIXES(DocumentTest, SandboxDisablesAppCache); |
| 221 FRIEND_TEST_ALL_PREFIXES(DocumentTest, SuboriginDisablesAppCache); |
| 217 }; | 222 }; |
| 218 | 223 |
| 219 } // namespace blink | 224 } // namespace blink |
| 220 | 225 |
| 221 #endif // ApplicationCacheHost_h | 226 #endif // ApplicationCacheHost_h |
| OLD | NEW |