Chromium Code Reviews| Index: Source/modules/serviceworkers/FetchStore.h |
| diff --git a/Source/modules/serviceworkers/FetchStore.h b/Source/modules/serviceworkers/FetchStore.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cf3c3b706ff3014bd33c8e6655e25f56c5124edd |
| --- /dev/null |
| +++ b/Source/modules/serviceworkers/FetchStore.h |
| @@ -0,0 +1,57 @@ |
| +// 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 FetchStore_h |
| +#define FetchStore_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" |
| +#include "wtf/Vector.h" |
| +#include "wtf/text/WTFString.h" |
| +#include <v8.h> |
| + |
| +namespace blink { |
| + |
| +class Dictionary; |
| +class Response; |
| +class Request; |
| +class ScriptState; |
| + |
| +// See https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache |
|
falken
2014/07/31 15:28:21
This comment is better in the IDL file.
|
| + |
| +class FetchStore FINAL : public RefCountedWillBeGarbageCollected<FetchStore>, public ScriptWrappable { |
| + WTF_MAKE_NONCOPYABLE(FetchStore); |
| +public: |
| + static PassRefPtrWillBeRawPtr<FetchStore> create(int fetchStoreID); |
| + |
| + // From FetchStore.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*, 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); |
| + ScriptPromise batch(ScriptState*, const Vector<Dictionary>& queryParams); |
| + |
| + void trace(Visitor*) { } |
| + |
| +private: |
| + explicit FetchStore(int fetchStoreID); |
| + |
| + const int ALLOW_UNUSED m_fetchStoreID; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // FetchStore_h |