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

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

Issue 434543002: Introducing the ServiceWorker Cache object. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update to trunk 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/serviceworkers/Cache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/Cache.h
diff --git a/Source/modules/serviceworkers/Cache.h b/Source/modules/serviceworkers/Cache.h
new file mode 100644
index 0000000000000000000000000000000000000000..5163613d9f229a5d3aaf92fb50e5bcd4e2e482e8
--- /dev/null
+++ b/Source/modules/serviceworkers/Cache.h
@@ -0,0 +1,56 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef Cache_h
+#define Cache_h
+
+#include "bindings/core/v8/ScriptPromise.h"
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "wtf/Forward.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/RefCounted.h"
+#include "wtf/Vector.h"
+#include "wtf/text/WTFString.h"
+#include <v8.h>
+
+namespace blink {
+
+class Dictionary;
+class Response;
+class Request;
+class ScriptState;
+class WebServiceWorkerCache;
+
+class Cache FINAL : public RefCountedWillBeGarbageCollected<Cache>, public ScriptWrappable {
+ WTF_MAKE_NONCOPYABLE(Cache);
+public:
+ static PassRefPtrWillBeRawPtr<Cache> fromWebServiceWorkerCache(WebServiceWorkerCache*);
+
+ // From Cache.idl:
+ ScriptPromise match(ScriptState*, Request*, const Dictionary& queryParams);
+ ScriptPromise match(ScriptState*, const String&, const Dictionary& queryParams);
+ ScriptPromise matchAll(ScriptState*, Request*, const Dictionary& queryParams);
+ ScriptPromise matchAll(ScriptState*, const String&, const Dictionary& queryParams);
+ ScriptPromise add(ScriptState*, Request*);
+ ScriptPromise add(ScriptState*, const String&);
+ ScriptPromise addAll(ScriptState*, const WillBeHeapVector<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 keys(ScriptState*);
+ ScriptPromise keys(ScriptState*, Request*, const Dictionary& queryParams);
+ ScriptPromise keys(ScriptState*, const String&, const Dictionary& queryParams);
+
+ void trace(Visitor*) { }
+
+private:
+ explicit Cache(WebServiceWorkerCache* webCache);
+
+ WebServiceWorkerCache const* ALLOW_UNUSED m_webCache;
+};
+
+} // namespace blink
+
+#endif // Cache_h
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/serviceworkers/Cache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698