OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef FetchStores_h |
| 6 #define FetchStores_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "bindings/core/v8/ScriptWrappable.h" |
| 11 #include "wtf/Forward.h" |
| 12 #include "wtf/Noncopyable.h" |
| 13 #include "wtf/RefCounted.h" |
| 14 |
| 15 namespace blink { |
| 16 |
| 17 class WebServiceWorkerFetchStores; |
| 18 |
| 19 // See https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.htm
l#cache-storage |
| 20 class FetchStores FINAL : public RefCountedWillBeGarbageCollected<FetchStores>,
public ScriptWrappable { |
| 21 WTF_MAKE_NONCOPYABLE(FetchStores); |
| 22 public: |
| 23 static PassRefPtrWillBeRawPtr<FetchStores> create(blink::WebServiceWorkerFet
chStores*); |
| 24 |
| 25 ScriptPromise get(ScriptState*, const String& fetchStoreName); |
| 26 ScriptPromise has(ScriptState*, const String& fetchStoreName); |
| 27 ScriptPromise createFunction(ScriptState*, const String& fetchStoreName); |
| 28 ScriptPromise deleteFunction(ScriptState*, const String& fetchStoreName); |
| 29 ScriptPromise keys(ScriptState*); |
| 30 |
| 31 void trace(Visitor*) { } |
| 32 |
| 33 private: |
| 34 explicit FetchStores(blink::WebServiceWorkerFetchStores*); |
| 35 |
| 36 blink::WebServiceWorkerFetchStores* m_webFetchStores; |
| 37 }; |
| 38 |
| 39 } // namespace blink |
| 40 |
| 41 #endif // FetchStores_h |
OLD | NEW |