| 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 WebServiceWorkerCache_h | 5 #ifndef WebServiceWorkerCache_h |
| 6 #define WebServiceWorkerCache_h | 6 #define WebServiceWorkerCache_h |
| 7 | 7 |
| 8 #include "public/platform/WebCallbacks.h" | 8 #include "public/platform/WebCallbacks.h" |
| 9 #include "public/platform/WebCommon.h" | 9 #include "public/platform/WebCommon.h" |
| 10 #include "public/platform/WebServiceWorkerCacheError.h" | |
| 11 #include "public/platform/WebServiceWorkerRequest.h" | |
| 12 #include "public/platform/WebServiceWorkerResponse.h" | |
| 13 #include "public/platform/WebString.h" | 10 #include "public/platform/WebString.h" |
| 14 #include "public/platform/WebVector.h" | 11 #include "public/platform/WebVector.h" |
| 12 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheError.h" |
| 13 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h" |
| 14 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 // The Service Worker Cache API. The embedder provides the implementation of the
Cache to Blink. Blink uses the interface | 18 // The Service Worker Cache API. The embedder provides the implementation of the
Cache to Blink. Blink uses the interface |
| 19 // to operate on entries. | 19 // to operate on entries. |
| 20 // This object is owned by Blink, and should be destroyed as each Cache instance
is no longer in use. | 20 // This object is owned by Blink, and should be destroyed as each Cache instance
is no longer in use. |
| 21 class WebServiceWorkerCache { | 21 class WebServiceWorkerCache { |
| 22 public: | 22 public: |
| 23 using CacheMatchCallbacks = WebCallbacks<WebServiceWorkerResponse*, WebServi
ceWorkerCacheError*>; | 23 using CacheMatchCallbacks = WebCallbacks<WebServiceWorkerResponse*, WebServi
ceWorkerCacheError*>; |
| 24 using CacheWithResponsesCallbacks = WebCallbacks<WebVector<WebServiceWorkerR
esponse>*, WebServiceWorkerCacheError*>; | 24 using CacheWithResponsesCallbacks = WebCallbacks<WebVector<WebServiceWorkerR
esponse>*, WebServiceWorkerCacheError*>; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // calling onSuccess or onFailure. | 59 // calling onSuccess or onFailure. |
| 60 virtual void dispatchMatch(CacheMatchCallbacks*, const WebServiceWorkerReque
st&, const QueryParams&) = 0; | 60 virtual void dispatchMatch(CacheMatchCallbacks*, const WebServiceWorkerReque
st&, const QueryParams&) = 0; |
| 61 virtual void dispatchMatchAll(CacheWithResponsesCallbacks*, const WebService
WorkerRequest&, const QueryParams&) = 0; | 61 virtual void dispatchMatchAll(CacheWithResponsesCallbacks*, const WebService
WorkerRequest&, const QueryParams&) = 0; |
| 62 virtual void dispatchKeys(CacheWithRequestsCallbacks*, const WebServiceWorke
rRequest*, const QueryParams&) = 0; | 62 virtual void dispatchKeys(CacheWithRequestsCallbacks*, const WebServiceWorke
rRequest*, const QueryParams&) = 0; |
| 63 virtual void dispatchBatch(CacheBatchCallbacks*, const WebVector<BatchOperat
ion>&) = 0; | 63 virtual void dispatchBatch(CacheBatchCallbacks*, const WebVector<BatchOperat
ion>&) = 0; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace blink | 66 } // namespace blink |
| 67 | 67 |
| 68 #endif // WebServiceWorkerCache_h | 68 #endif // WebServiceWorkerCache_h |
| OLD | NEW |