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

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

Issue 424643002: Introducing the WebServiceWorkerCacheStorage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: combine with prior CL Created 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WebServiceWorkerFetchStores_h
6 #define WebServiceWorkerFetchStores_h
7
8 #include "WebCommon.h"
9 #include "public/platform/WebCallbacks.h"
10 #include "public/platform/WebServiceWorkerFetchStoresError.h"
11 #include "public/platform/WebString.h"
12 #include "public/platform/WebVector.h"
13
14 namespace blink {
15
16 // An interface to the FetchStores API, implemented by the embedder and passed i n to blink. Blink's implementation
17 // of the ServiceWorker spec will call these methods to create/open caches, and expect callbacks from the embedder
18 // after operations complete.
19 class WebServiceWorkerFetchStores {
20 public:
21
22 typedef WebCallbacks<void, WebServiceWorkerFetchStoresError> FetchStoresCall backs;
23 typedef WebCallbacks<int /* fetchStoreID */, WebServiceWorkerFetchStoresErro r> FetchStoresWithFetchStoreCallbacks;
24 typedef WebCallbacks<WebVector<WebString>, WebServiceWorkerFetchStoresError> FetchStoresKeysCallbacks;
25
26 WebServiceWorkerFetchStores() { }
27 virtual ~WebServiceWorkerFetchStores() { }
28
29 // Ownership of the FetchStores*Callbacks methods passes to the WebServiceWo rkerFetchStores
30 // instance, which will delete it after calling onSuccess or onFailure.
31 virtual void dispatchGet(FetchStoresWithFetchStoreCallbacks*, const WebStrin g& fetchStoreName) = 0;
32 virtual void dispatchHas(FetchStoresCallbacks*, const WebString& fetchStoreN ame) = 0;
33 virtual void dispatchCreate(FetchStoresWithFetchStoreCallbacks*, const WebSt ring& fetchStoreName) = 0;
34 virtual void dispatchDelete(FetchStoresCallbacks*, const WebString& fetchSto reName) = 0;
35 virtual void dispatchKeys(FetchStoresKeysCallbacks*) = 0;
36 };
37
38 } // namespace blink
39
40 #endif // WebServiceWorkerFetchStores_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698