Chromium Code Reviews| Index: Source/modules/serviceworkers/Cache.h |
| diff --git a/Source/modules/serviceworkers/Cache.h b/Source/modules/serviceworkers/Cache.h |
| index 63c378014647473e7e018b19fa06d8c554544291..ad3d49993a4cf074c1ba8aad7e5562ddb4189d7c 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/Vector.h" |
| #include "wtf/text/WTFString.h" |
| #include <v8.h> |
|
dominicc (has gone to gerrit)
2014/09/17 12:53:58
Why is this include needed?
gavinp
2014/09/17 15:41:52
It's been there from the start; likely for no good
|
| @@ -23,7 +25,7 @@ class Request; |
| class ScriptState; |
| class WebServiceWorkerCache; |
|
dominicc (has gone to gerrit)
2014/09/17 12:53:58
This might be redundant with the new include.
gavinp
2014/09/17 15:41:53
Done.
|
| -class Cache FINAL : public GarbageCollected<Cache>, public ScriptWrappable { |
| +class Cache FINAL : public GarbageCollectedFinalized<Cache>, public ScriptWrappable, public WebServiceWorkerCache::ProxyInterface { |
| DEFINE_WRAPPERTYPEINFO(); |
| WTF_MAKE_NONCOPYABLE(Cache); |
| public: |
| @@ -39,8 +41,8 @@ public: |
| ScriptPromise addAll(ScriptState*, const Vector<ScriptValue>&); |
| ScriptPromise deleteFunction(ScriptState*, Request*, const Dictionary& queryParams); |
| ScriptPromise deleteFunction(ScriptState*, const String&, const Dictionary& queryParams); |
| - ScriptPromise put(ScriptState*, Request*, Response*); |
| - ScriptPromise put(ScriptState*, const String&, Response*); |
| + ScriptPromise put(ScriptState*, Request*, const Response*); |
| + ScriptPromise put(ScriptState*, const String&, const Response*); |
| ScriptPromise keys(ScriptState*); |
| ScriptPromise keys(ScriptState*, Request*, const Dictionary& queryParams); |
| ScriptPromise keys(ScriptState*, const String&, const Dictionary& queryParams); |
| @@ -50,9 +52,20 @@ public: |
| static PassRefPtrWillBeRawPtr<DOMException> domExceptionForCacheError(WebServiceWorkerCacheError); |
| private: |
| - explicit Cache(WebServiceWorkerCache* webCache); |
| + explicit Cache(WebServiceWorkerCache*); |
| - WebServiceWorkerCache const* ALLOW_UNUSED m_webCache; |
| + static Cache* create(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*, const Response*); |
| + ScriptPromise keysImpl(ScriptState*); |
| + ScriptPromise keysImpl(ScriptState*, Request*, const Dictionary& queryParams); |
| + |
| + OwnPtr<WebServiceWorkerCache> m_webCache; |
| }; |
| } // namespace blink |