| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebServiceWorkerCacheStorage_h | 5 #ifndef WebServiceWorkerCacheStorage_h |
| 6 #define WebServiceWorkerCacheStorage_h | 6 #define WebServiceWorkerCacheStorage_h |
| 7 | 7 |
| 8 #include "WebCommon.h" | 8 #include "WebCommon.h" |
| 9 #include "public/platform/WebCallbacks.h" | 9 #include "public/platform/WebCallbacks.h" |
| 10 #include "public/platform/WebServiceWorkerCacheError.h" | 10 #include "public/platform/WebServiceWorkerCacheError.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public: | 22 public: |
| 23 typedef WebCallbacks<void, WebServiceWorkerCacheError> CacheStorageCallbacks
; | 23 typedef WebCallbacks<void, WebServiceWorkerCacheError> CacheStorageCallbacks
; |
| 24 typedef WebCallbacks<WebServiceWorkerCache, WebServiceWorkerCacheError> Cach
eStorageWithCacheCallbacks; | 24 typedef WebCallbacks<WebServiceWorkerCache, WebServiceWorkerCacheError> Cach
eStorageWithCacheCallbacks; |
| 25 typedef WebCallbacks<WebVector<WebString>, WebServiceWorkerCacheError> Cache
StorageKeysCallbacks; | 25 typedef WebCallbacks<WebVector<WebString>, WebServiceWorkerCacheError> Cache
StorageKeysCallbacks; |
| 26 | 26 |
| 27 virtual ~WebServiceWorkerCacheStorage() { } | 27 virtual ~WebServiceWorkerCacheStorage() { } |
| 28 | 28 |
| 29 // Ownership of the CacheStorage*Callbacks methods passes to the WebServiceW
orkerCacheStorage instance, which | 29 // Ownership of the CacheStorage*Callbacks methods passes to the WebServiceW
orkerCacheStorage instance, which |
| 30 // will delete it after calling onSuccess or onFailure. | 30 // will delete it after calling onSuccess or onFailure. |
| 31 | 31 |
| 32 // dispatchGet() or dispatchCreate() can return a WebServiceWorkerCache obje
ct, and these objects are owned by | 32 // dispatchOpen() can return a WebServiceWorkerCache object. These |
| 33 // Blink, and should be destroyed when they are no longer needed. | 33 // objects are owned by Blink and should be destroyed when they are no |
| 34 virtual void dispatchGet(CacheStorageWithCacheCallbacks*, const WebString& c
acheName) = 0; | 34 // longer needed. |
| 35 virtual void dispatchHas(CacheStorageCallbacks*, const WebString& cacheName)
= 0; | 35 virtual void dispatchHas(CacheStorageCallbacks*, const WebString& cacheName)
= 0; |
| 36 virtual void dispatchCreate(CacheStorageWithCacheCallbacks*, const WebString
& cacheName) = 0; | 36 virtual void dispatchOpen(CacheStorageWithCacheCallbacks*, const WebString&
cacheName) = 0; |
| 37 virtual void dispatchDelete(CacheStorageCallbacks*, const WebString& cacheNa
me) = 0; | 37 virtual void dispatchDelete(CacheStorageCallbacks*, const WebString& cacheNa
me) = 0; |
| 38 virtual void dispatchKeys(CacheStorageKeysCallbacks*) = 0; | 38 virtual void dispatchKeys(CacheStorageKeysCallbacks*) = 0; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace blink | 41 } // namespace blink |
| 42 | 42 |
| 43 #endif // WebServiceWorkerCacheStorage_h | 43 #endif // WebServiceWorkerCacheStorage_h |
| OLD | NEW |