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 Cache_h | |
| 6 #define Cache_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptPromise.h" | |
| 9 #include "bindings/core/v8/ScriptState.h" | |
|
falken
2014/08/06 04:46:28
Since ScriptState is forward declared below, don't
gavinp
2014/08/08 19:55:26
Done.
| |
| 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 class WebServiceWorkerCache; | |
| 25 | |
| 26 // See https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.htm l#cache | |
|
falken
2014/08/06 04:46:28
Please move this comment to the .idl file. Our oth
gavinp
2014/08/08 19:55:26
Ahh, good point. I'll also upload a style CL to mo
| |
| 27 | |
| 28 class Cache FINAL : public RefCountedWillBeGarbageCollected<Cache>, public Scrip tWrappable { | |
| 29 WTF_MAKE_NONCOPYABLE(Cache); | |
| 30 public: | |
| 31 static PassRefPtrWillBeRawPtr<Cache> fromWebServiceWorkerCache(WebServiceWor kerCache*); | |
| 32 | |
| 33 // From Cache.idl: | |
| 34 ScriptPromise match(ScriptState*, Request*, const Dictionary& queryParams); | |
| 35 ScriptPromise match(ScriptState*, const String&, const Dictionary& queryPara ms); | |
| 36 ScriptPromise matchAll(ScriptState*, Request*, const Dictionary& queryParams ); | |
| 37 ScriptPromise matchAll(ScriptState*, const String&, const Dictionary& queryP arams); | |
| 38 ScriptPromise add(ScriptState*, Request*); | |
| 39 ScriptPromise add(ScriptState*, const String&); | |
| 40 ScriptPromise addAll(ScriptState*, const WillBeHeapVector<ScriptValue>&); | |
| 41 ScriptPromise deleteFunction(ScriptState*, Request*, const Dictionary& query Params); | |
| 42 ScriptPromise deleteFunction(ScriptState*, const String&, const Dictionary& queryParams); | |
| 43 ScriptPromise put(ScriptState*, Request*, Response*); | |
| 44 ScriptPromise put(ScriptState*, const String&, Response*); | |
| 45 ScriptPromise keys(ScriptState*); | |
| 46 ScriptPromise keys(ScriptState*, Request*, const Dictionary& queryParams); | |
| 47 ScriptPromise keys(ScriptState*, const String&, const Dictionary& queryParam s); | |
| 48 | |
| 49 void trace(Visitor*) { } | |
| 50 | |
| 51 private: | |
| 52 explicit Cache(WebServiceWorkerCache* webCache); | |
| 53 | |
| 54 WebServiceWorkerCache const* ALLOW_UNUSED m_webCache; | |
| 55 }; | |
| 56 | |
| 57 } // namespace blink | |
| 58 | |
| 59 #endif // Cache_h | |
| OLD | NEW |