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

Unified Diff: Source/modules/serviceworkers/Cache.h

Issue 433793002: Introducing the WebServiceWorkerCache. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix build Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/serviceworkers/Cache.h
diff --git a/Source/modules/serviceworkers/Cache.h b/Source/modules/serviceworkers/Cache.h
index d470b56d336ddd617ad9f1eb32c4ec9391c41cae..5ac9f6154f4df26e276823e85e8cf36204366175 100644
--- a/Source/modules/serviceworkers/Cache.h
+++ b/Source/modules/serviceworkers/Cache.h
@@ -8,9 +8,11 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/DOMException.h"
+#include "public/platform/WebServiceWorkerCache.h"
#include "public/platform/WebServiceWorkerCacheError.h"
#include "wtf/Forward.h"
#include "wtf/Noncopyable.h"
+#include "wtf/OwnPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
@@ -24,7 +26,7 @@ class Request;
class ScriptState;
class WebServiceWorkerCache;
-class Cache FINAL : public RefCountedWillBeGarbageCollected<Cache>, public ScriptWrappable {
+class Cache FINAL : public RefCountedWillBeGarbageCollected<Cache>, public ScriptWrappable, public WebServiceWorkerCache::ProxyInterface {
DEFINE_WRAPPERTYPEINFO();
WTF_MAKE_NONCOPYABLE(Cache);
public:
@@ -51,9 +53,20 @@ public:
static PassRefPtrWillBeRawPtr<DOMException> domExceptionForCacheError(WebServiceWorkerCacheError);
private:
- explicit Cache(WebServiceWorkerCache* webCache);
+ explicit Cache(WebServiceWorkerCache*);
- WebServiceWorkerCache const* ALLOW_UNUSED m_webCache;
+ static PassRefPtrWillBeRawPtr<Cache> create(WebServiceWorkerCache*);
+
+ ScriptPromise matchImpl(ScriptState*, PassRefPtrWillBeRawPtr<Request>, const Dictionary& queryParams);
+ ScriptPromise matchAllImpl(ScriptState*, PassRefPtrWillBeRawPtr<Request>, const Dictionary& queryParams);
+ ScriptPromise addImpl(ScriptState*, PassRefPtrWillBeRawPtr<Request>);
+ ScriptPromise addAllImpl(ScriptState*, Vector<RefPtrWillBeRawPtr<Request> >);
+ ScriptPromise deleteImpl(ScriptState*, PassRefPtrWillBeRawPtr<Request>, const Dictionary& queryParams);
+ ScriptPromise putImpl(ScriptState*, PassRefPtrWillBeRawPtr<Request>, Response*);
+ ScriptPromise keysImpl(ScriptState*);
+ ScriptPromise keysImpl(ScriptState*, PassRefPtrWillBeRawPtr<Request>, const Dictionary& queryParams);
+
+ OwnPtr<WebServiceWorkerCache> m_webCache;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698