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

Side by Side Diff: Source/modules/serviceworkers/CacheStorage.h

Issue 380923002: Introducing the WebServiceWorkerCacheStorage. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: api fixes Created 6 years, 5 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 CacheStorage_h 5 #ifndef CacheStorage_h
6 #define CacheStorage_h 6 #define CacheStorage_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
11 #include "wtf/Forward.h" 11 #include "wtf/Forward.h"
12 #include "wtf/Noncopyable.h" 12 #include "wtf/Noncopyable.h"
13 #include "wtf/PassRefPtr.h"
13 #include "wtf/RefCounted.h" 14 #include "wtf/RefCounted.h"
14 15
16 namespace blink {
17 class WebServiceWorkerCacheStorage;
18 }
19
15 namespace WebCore { 20 namespace WebCore {
16 21
17 // See https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.htm l#cache-storage 22 // See https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.htm l#cache-storage
18 23
19 class CacheStorage FINAL : public RefCountedWillBeGarbageCollected<CacheStorage> , public ScriptWrappable { 24 class CacheStorage FINAL : public RefCountedWillBeGarbageCollected<CacheStorage> , public ScriptWrappable {
20 WTF_MAKE_NONCOPYABLE(CacheStorage); 25 WTF_MAKE_NONCOPYABLE(CacheStorage);
21 public: 26 public:
22 static PassRefPtr<CacheStorage> create(); 27 static PassRefPtr<CacheStorage> create(blink::WebServiceWorkerCacheStorage*) ;
23 virtual ~CacheStorage(); 28 virtual ~CacheStorage();
24 29
25 ScriptPromise createFunction(ScriptState*, const String& key); 30 ScriptPromise createFunction(ScriptState*, const String& key);
26 ScriptPromise rename(ScriptState*, const String& oldKey, const String& newKe y); 31 ScriptPromise rename(ScriptState*, const String& oldKey, const String& newKe y);
27 ScriptPromise get(ScriptState*, const String& key); 32 ScriptPromise get(ScriptState*, const String& key);
28 ScriptPromise deleteFunction(ScriptState*, const String& key); 33 ScriptPromise deleteFunction(ScriptState*, const String& key);
29 ScriptPromise keys(ScriptState*); 34 ScriptPromise keys(ScriptState*);
30 35
31 private: 36 private:
32 CacheStorage(); 37 CacheStorage(blink::WebServiceWorkerCacheStorage*);
38
39 blink::WebServiceWorkerCacheStorage* m_webCacheStorage;
33 }; 40 };
34 41
35 } // namespace WebCore 42 } // namespace WebCore
36 43
37 #endif // CacheStorage_h 44 #endif // CacheStorage_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/serviceworkers/CacheStorage.cpp » ('j') | public/platform/WebServiceWorker.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698