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

Side by Side Diff: public/platform/WebServiceWorkerCache.h

Issue 1240763002: CallbackPromiseAdapter types should be more compatible with WebCallbacks (3/3). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 4 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 | Annotate | Revision Log
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/WebPassOwnPtr.h"
11 #include "public/platform/WebServiceWorkerCacheError.h" 10 #include "public/platform/WebServiceWorkerCacheError.h"
12 #include "public/platform/WebServiceWorkerRequest.h" 11 #include "public/platform/WebServiceWorkerRequest.h"
13 #include "public/platform/WebServiceWorkerResponse.h" 12 #include "public/platform/WebServiceWorkerResponse.h"
14 #include "public/platform/WebString.h" 13 #include "public/platform/WebString.h"
15 #include "public/platform/WebVector.h" 14 #include "public/platform/WebVector.h"
16 15
17 namespace blink { 16 namespace blink {
18 17
19 // 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
20 // to operate on entries. 19 // to operate on entries.
21 // 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.
22 class WebServiceWorkerCache { 21 class WebServiceWorkerCache {
23 public: 22 public:
24 using CacheMatchCallbacks = WebCallbacks<WebServiceWorkerResponse*, WebServi ceWorkerCacheError*>; 23 using CacheMatchCallbacks = WebCallbacks<WebServiceWorkerResponse*, WebServi ceWorkerCacheError*>;
25 using CacheWithResponsesCallbacks = WebCallbacks<WebVector<WebServiceWorkerR esponse>*, WebServiceWorkerCacheError*>; 24 using CacheWithResponsesCallbacks = WebCallbacks<WebVector<WebServiceWorkerR esponse>*, WebServiceWorkerCacheError*>;
26 using CacheWithRequestsCallbacks = WebCallbacks<WebVector<WebServiceWorkerRe quest>*, WebServiceWorkerCacheError*>; 25 using CacheWithRequestsCallbacks = WebCallbacks<WebVector<WebServiceWorkerRe quest>*, WebServiceWorkerCacheError*>;
27 using CacheBatchCallbacks = WebCallbacks<void, WebPassOwnPtr<WebServiceWorke rCacheError>>; 26 using CacheBatchCallbacks = WebCallbacks<void, WebServiceWorkerCacheError>;
28 27
29 virtual ~WebServiceWorkerCache() { } 28 virtual ~WebServiceWorkerCache() { }
30 29
31 // Options that affect the scope of searches. 30 // Options that affect the scope of searches.
32 struct QueryParams { 31 struct QueryParams {
33 QueryParams() : ignoreSearch(false), ignoreMethod(false), ignoreVary(fal se) { } 32 QueryParams() : ignoreSearch(false), ignoreMethod(false), ignoreVary(fal se) { }
34 33
35 bool ignoreSearch; 34 bool ignoreSearch;
36 bool ignoreMethod; 35 bool ignoreMethod;
37 bool ignoreVary; 36 bool ignoreVary;
(...skipping 22 matching lines...) Expand all
60 // calling onSuccess or onFailure. 59 // calling onSuccess or onFailure.
61 virtual void dispatchMatch(CacheMatchCallbacks*, const WebServiceWorkerReque st&, const QueryParams&) = 0; 60 virtual void dispatchMatch(CacheMatchCallbacks*, const WebServiceWorkerReque st&, const QueryParams&) = 0;
62 virtual void dispatchMatchAll(CacheWithResponsesCallbacks*, const WebService WorkerRequest&, const QueryParams&) = 0; 61 virtual void dispatchMatchAll(CacheWithResponsesCallbacks*, const WebService WorkerRequest&, const QueryParams&) = 0;
63 virtual void dispatchKeys(CacheWithRequestsCallbacks*, const WebServiceWorke rRequest*, const QueryParams&) = 0; 62 virtual void dispatchKeys(CacheWithRequestsCallbacks*, const WebServiceWorke rRequest*, const QueryParams&) = 0;
64 virtual void dispatchBatch(CacheBatchCallbacks*, const WebVector<BatchOperat ion>&) = 0; 63 virtual void dispatchBatch(CacheBatchCallbacks*, const WebVector<BatchOperat ion>&) = 0;
65 }; 64 };
66 65
67 } // namespace blink 66 } // namespace blink
68 67
69 #endif // WebServiceWorkerCache_h 68 #endif // WebServiceWorkerCache_h
OLDNEW
« no previous file with comments | « public/platform/WebGeofencingProvider.h ('k') | public/platform/WebServiceWorkerClientsClaimCallbacks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698