| 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" | 10 #include "public/platform/WebServiceWorkerCacheError.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class WebServiceWorkerCache { | 21 class WebServiceWorkerCache { |
| 22 public: | 22 public: |
| 23 typedef WebCallbacks<WebServiceWorkerResponse, WebServiceWorkerCacheError> C
acheMatchCallbacks; | 23 typedef WebCallbacks<WebServiceWorkerResponse, WebServiceWorkerCacheError> C
acheMatchCallbacks; |
| 24 typedef WebCallbacks<WebVector<WebServiceWorkerResponse>, WebServiceWorkerCa
cheError> CacheWithResponsesCallbacks; | 24 typedef WebCallbacks<WebVector<WebServiceWorkerResponse>, WebServiceWorkerCa
cheError> CacheWithResponsesCallbacks; |
| 25 typedef WebCallbacks<WebVector<WebServiceWorkerRequest>, WebServiceWorkerCac
heError> CacheWithRequestsCallbacks; | 25 typedef WebCallbacks<WebVector<WebServiceWorkerRequest>, WebServiceWorkerCac
heError> CacheWithRequestsCallbacks; |
| 26 | 26 |
| 27 virtual ~WebServiceWorkerCache() { } | 27 virtual ~WebServiceWorkerCache() { } |
| 28 | 28 |
| 29 // Options that affect the scope of searches. | 29 // Options that affect the scope of searches. |
| 30 struct QueryParams { | 30 struct QueryParams { |
| 31 QueryParams() : ignoreSearch(false), ignoreMethod(false), ignoreVary(fal
se), prefixMatch(false) { } | 31 QueryParams() : ignoreSearch(false), ignoreMethod(false), ignoreVary(fal
se) { } |
| 32 | 32 |
| 33 bool ignoreSearch; | 33 bool ignoreSearch; |
| 34 bool ignoreMethod; | 34 bool ignoreMethod; |
| 35 bool ignoreVary; | 35 bool ignoreVary; |
| 36 bool prefixMatch; | |
| 37 WebString cacheName; | 36 WebString cacheName; |
| 38 }; | 37 }; |
| 39 | 38 |
| 40 enum OperationType { | 39 enum OperationType { |
| 41 OperationTypeUndefined, | 40 OperationTypeUndefined, |
| 42 OperationTypePut, | 41 OperationTypePut, |
| 43 OperationTypeDelete, | 42 OperationTypeDelete, |
| 44 OperationTypeLast = OperationTypeDelete | 43 OperationTypeLast = OperationTypeDelete |
| 45 }; | 44 }; |
| 46 | 45 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 59 // calling onSuccess or onFailure. | 58 // calling onSuccess or onFailure. |
| 60 virtual void dispatchMatch(CacheMatchCallbacks*, const WebServiceWorkerReque
st&, const QueryParams&) = 0; | 59 virtual void dispatchMatch(CacheMatchCallbacks*, const WebServiceWorkerReque
st&, const QueryParams&) = 0; |
| 61 virtual void dispatchMatchAll(CacheWithResponsesCallbacks*, const WebService
WorkerRequest&, const QueryParams&) = 0; | 60 virtual void dispatchMatchAll(CacheWithResponsesCallbacks*, const WebService
WorkerRequest&, const QueryParams&) = 0; |
| 62 virtual void dispatchKeys(CacheWithRequestsCallbacks*, const WebServiceWorke
rRequest*, const QueryParams&) = 0; | 61 virtual void dispatchKeys(CacheWithRequestsCallbacks*, const WebServiceWorke
rRequest*, const QueryParams&) = 0; |
| 63 virtual void dispatchBatch(CacheWithResponsesCallbacks*, const WebVector<Bat
chOperation>&) = 0; | 62 virtual void dispatchBatch(CacheWithResponsesCallbacks*, const WebVector<Bat
chOperation>&) = 0; |
| 64 }; | 63 }; |
| 65 | 64 |
| 66 } // namespace blink | 65 } // namespace blink |
| 67 | 66 |
| 68 #endif // WebServiceWorkerCache_h | 67 #endif // WebServiceWorkerCache_h |
| OLD | NEW |