Index: Source/modules/serviceworkers/Cache.h |
diff --git a/Source/modules/serviceworkers/Cache.h b/Source/modules/serviceworkers/Cache.h |
index 1e93873e210183e0ce1c2452f14bbd319636dc1c..491b607cf18de41b4dd655e116619b6e1d9822a6 100644 |
--- a/Source/modules/serviceworkers/Cache.h |
+++ b/Source/modules/serviceworkers/Cache.h |
@@ -8,12 +8,13 @@ |
#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/Vector.h" |
#include "wtf/text/WTFString.h" |
-#include <v8.h> |
namespace blink { |
@@ -21,9 +22,8 @@ class Dictionary; |
class Response; |
class Request; |
class ScriptState; |
-class WebServiceWorkerCache; |
-class Cache FINAL : public GarbageCollected<Cache>, public ScriptWrappable { |
+class Cache FINAL : public GarbageCollectedFinalized<Cache>, public ScriptWrappable { |
DEFINE_WRAPPERTYPEINFO(); |
WTF_MAKE_NONCOPYABLE(Cache); |
public: |
@@ -45,14 +45,23 @@ public: |
ScriptPromise keys(ScriptState*, Request*, const Dictionary& queryParams); |
ScriptPromise keys(ScriptState*, const String&, const Dictionary& queryParams); |
- void trace(Visitor*) { } |
- |
static PassRefPtrWillBeRawPtr<DOMException> domExceptionForCacheError(WebServiceWorkerCacheError); |
+ void trace(Visitor*) { } |
+ |
private: |
- explicit Cache(WebServiceWorkerCache* webCache); |
+ explicit Cache(WebServiceWorkerCache*); |
+ |
+ ScriptPromise matchImpl(ScriptState*, Request*, const Dictionary& queryParams); |
+ ScriptPromise matchAllImpl(ScriptState*, Request*, const Dictionary& queryParams); |
+ ScriptPromise addImpl(ScriptState*, Request*); |
+ ScriptPromise addAllImpl(ScriptState*, Vector<Request*>); |
+ ScriptPromise deleteImpl(ScriptState*, Request*, const Dictionary& queryParams); |
+ ScriptPromise putImpl(ScriptState*, Request*, Response*); |
+ ScriptPromise keysImpl(ScriptState*); |
+ ScriptPromise keysImpl(ScriptState*, Request*, const Dictionary& queryParams); |
- WebServiceWorkerCache const* ALLOW_UNUSED m_webCache; |
+ OwnPtr<WebServiceWorkerCache> m_webCache; |
}; |
} // namespace blink |