Chromium Code Reviews| 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 FetchStore_h | |
| 6 #define FetchStore_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 #include "wtf/Vector.h" | |
| 15 #include "wtf/text/WTFString.h" | |
| 16 #include <v8.h> | |
| 17 | |
| 18 namespace blink { | |
| 19 | |
| 20 class Dictionary; | |
| 21 class Response; | |
| 22 class Request; | |
| 23 class ScriptState; | |
| 24 | |
| 25 // See https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.htm l#cache | |
|
falken
2014/07/31 15:28:21
This comment is better in the IDL file.
| |
| 26 | |
| 27 class FetchStore FINAL : public RefCountedWillBeGarbageCollected<FetchStore>, pu blic ScriptWrappable { | |
| 28 WTF_MAKE_NONCOPYABLE(FetchStore); | |
| 29 public: | |
| 30 static PassRefPtrWillBeRawPtr<FetchStore> create(int fetchStoreID); | |
| 31 | |
| 32 // From FetchStore.idl: | |
| 33 ScriptPromise match(ScriptState*, Request*, const Dictionary& queryParams); | |
| 34 ScriptPromise match(ScriptState*, const String&, const Dictionary& queryPara ms); | |
| 35 ScriptPromise matchAll(ScriptState*, Request*, const Dictionary& queryParams ); | |
| 36 ScriptPromise matchAll(ScriptState*, const String&, const Dictionary& queryP arams); | |
| 37 ScriptPromise add(ScriptState*, const WillBeHeapVector<ScriptValue>&); | |
| 38 ScriptPromise deleteFunction(ScriptState*, Request*, const Dictionary& query Params); | |
| 39 ScriptPromise deleteFunction(ScriptState*, const String&, const Dictionary& queryParams); | |
| 40 ScriptPromise put(ScriptState*, Request*, Response*); | |
| 41 ScriptPromise put(ScriptState*, const String&, Response*); | |
| 42 ScriptPromise keys(ScriptState*); | |
| 43 ScriptPromise keys(ScriptState*, Request*, const Dictionary& queryParams); | |
| 44 ScriptPromise keys(ScriptState*, const String&, const Dictionary& queryParam s); | |
| 45 ScriptPromise batch(ScriptState*, const Vector<Dictionary>& queryParams); | |
| 46 | |
| 47 void trace(Visitor*) { } | |
| 48 | |
| 49 private: | |
| 50 explicit FetchStore(int fetchStoreID); | |
| 51 | |
| 52 const int ALLOW_UNUSED m_fetchStoreID; | |
| 53 }; | |
| 54 | |
| 55 } // namespace blink | |
| 56 | |
| 57 #endif // FetchStore_h | |
| OLD | NEW |