Index: Source/modules/serviceworkers/FetchStores.h |
diff --git a/Source/modules/serviceworkers/FetchStores.h b/Source/modules/serviceworkers/FetchStores.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4f629a604c5c16cdbb68b9926c089c1c348c59c3 |
--- /dev/null |
+++ b/Source/modules/serviceworkers/FetchStores.h |
@@ -0,0 +1,41 @@ |
+// 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 FetchStores_h |
+#define FetchStores_h |
+ |
+#include "bindings/core/v8/ScriptPromise.h" |
+#include "bindings/core/v8/ScriptState.h" |
+#include "bindings/core/v8/ScriptWrappable.h" |
+#include "wtf/Forward.h" |
+#include "wtf/Noncopyable.h" |
+#include "wtf/RefCounted.h" |
+ |
+namespace blink { |
+ |
+class WebServiceWorkerFetchStores; |
+ |
+// See https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache-storage |
+class FetchStores FINAL : public RefCountedWillBeGarbageCollected<FetchStores>, public ScriptWrappable { |
+ WTF_MAKE_NONCOPYABLE(FetchStores); |
+public: |
+ static PassRefPtrWillBeRawPtr<FetchStores> create(blink::WebServiceWorkerFetchStores*); |
+ |
+ ScriptPromise get(ScriptState*, const String& fetchStoreName); |
+ ScriptPromise has(ScriptState*, const String& fetchStoreName); |
+ ScriptPromise createFunction(ScriptState*, const String& fetchStoreName); |
+ ScriptPromise deleteFunction(ScriptState*, const String& fetchStoreName); |
+ ScriptPromise keys(ScriptState*); |
+ |
+ void trace(Visitor*) { } |
+ |
+private: |
+ explicit FetchStores(blink::WebServiceWorkerFetchStores*); |
+ |
+ blink::WebServiceWorkerFetchStores* m_webFetchStores; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // FetchStores_h |