Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerCache.h

Issue 2387983002: Worker: Reflow comments in worker components (Closed)
Patch Set: manually tweak Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/WebString.h" 10 #include "public/platform/WebString.h"
11 #include "public/platform/WebVector.h" 11 #include "public/platform/WebVector.h"
12 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheError.h" 12 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheError.h"
13 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h" 13 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h"
14 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.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
19 // to operate on entries. 19 // Cache to Blink. Blink uses the interface to operate on entries. This object
20 // This object is owned by Blink, and should be destroyed as each Cache instance is no longer in use. 20 // is owned by Blink, and should be destroyed as each Cache instance is no
21 // longer in use.
21 class WebServiceWorkerCache { 22 class WebServiceWorkerCache {
22 public: 23 public:
23 using CacheMatchCallbacks = 24 using CacheMatchCallbacks =
24 WebCallbacks<const WebServiceWorkerResponse&, WebServiceWorkerCacheError>; 25 WebCallbacks<const WebServiceWorkerResponse&, WebServiceWorkerCacheError>;
25 using CacheWithResponsesCallbacks = 26 using CacheWithResponsesCallbacks =
26 WebCallbacks<const WebVector<WebServiceWorkerResponse>&, 27 WebCallbacks<const WebVector<WebServiceWorkerResponse>&,
27 WebServiceWorkerCacheError>; 28 WebServiceWorkerCacheError>;
28 using CacheWithRequestsCallbacks = 29 using CacheWithRequestsCallbacks =
29 WebCallbacks<const WebVector<WebServiceWorkerRequest>&, 30 WebCallbacks<const WebVector<WebServiceWorkerRequest>&,
30 WebServiceWorkerCacheError>; 31 WebServiceWorkerCacheError>;
(...skipping 23 matching lines...) Expand all
54 BatchOperation() : operationType(OperationTypeUndefined) {} 55 BatchOperation() : operationType(OperationTypeUndefined) {}
55 56
56 OperationType operationType; 57 OperationType operationType;
57 WebServiceWorkerRequest request; 58 WebServiceWorkerRequest request;
58 WebServiceWorkerResponse response; 59 WebServiceWorkerResponse response;
59 QueryParams matchParams; 60 QueryParams matchParams;
60 }; 61 };
61 62
62 WebServiceWorkerCache() {} 63 WebServiceWorkerCache() {}
63 64
64 // Ownership of the Cache*Callbacks methods passes to the WebServiceWorkerCach e instance, which will delete it after 65 // Ownership of the Cache*Callbacks methods passes to the
65 // calling onSuccess or onFailure. 66 // WebServiceWorkerCache instance, which will delete it after calling
67 // onSuccess or onFailure.
66 virtual void dispatchMatch(CacheMatchCallbacks*, 68 virtual void dispatchMatch(CacheMatchCallbacks*,
67 const WebServiceWorkerRequest&, 69 const WebServiceWorkerRequest&,
68 const QueryParams&) = 0; 70 const QueryParams&) = 0;
69 virtual void dispatchMatchAll(CacheWithResponsesCallbacks*, 71 virtual void dispatchMatchAll(CacheWithResponsesCallbacks*,
70 const WebServiceWorkerRequest&, 72 const WebServiceWorkerRequest&,
71 const QueryParams&) = 0; 73 const QueryParams&) = 0;
72 virtual void dispatchKeys(CacheWithRequestsCallbacks*, 74 virtual void dispatchKeys(CacheWithRequestsCallbacks*,
73 const WebServiceWorkerRequest&, 75 const WebServiceWorkerRequest&,
74 const QueryParams&) = 0; 76 const QueryParams&) = 0;
75 virtual void dispatchBatch(CacheBatchCallbacks*, 77 virtual void dispatchBatch(CacheBatchCallbacks*,
76 const WebVector<BatchOperation>&) = 0; 78 const WebVector<BatchOperation>&) = 0;
77 }; 79 };
78 80
79 } // namespace blink 81 } // namespace blink
80 82
81 #endif // WebServiceWorkerCache_h 83 #endif // WebServiceWorkerCache_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698