| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef Cache_h | 5 #ifndef Cache_h |
| 6 #define Cache_h | 6 #define Cache_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
| 11 #include "public/platform/WebServiceWorkerCacheError.h" | 11 #include "public/platform/WebServiceWorkerCacheError.h" |
| 12 #include "wtf/Forward.h" | 12 #include "wtf/Forward.h" |
| 13 #include "wtf/Noncopyable.h" | 13 #include "wtf/Noncopyable.h" |
| 14 #include "wtf/RefCounted.h" | |
| 15 #include "wtf/Vector.h" | 14 #include "wtf/Vector.h" |
| 16 #include "wtf/text/WTFString.h" | 15 #include "wtf/text/WTFString.h" |
| 17 #include <v8.h> | 16 #include <v8.h> |
| 18 | 17 |
| 19 namespace blink { | 18 namespace blink { |
| 20 | 19 |
| 21 class Dictionary; | 20 class Dictionary; |
| 22 class Response; | 21 class Response; |
| 23 class Request; | 22 class Request; |
| 24 class ScriptState; | 23 class ScriptState; |
| 25 class WebServiceWorkerCache; | 24 class WebServiceWorkerCache; |
| 26 | 25 |
| 27 class Cache FINAL : public RefCountedWillBeGarbageCollected<Cache>, public Scrip
tWrappable { | 26 class Cache FINAL : public GarbageCollected<Cache>, public ScriptWrappable { |
| 28 DEFINE_WRAPPERTYPEINFO(); | 27 DEFINE_WRAPPERTYPEINFO(); |
| 29 WTF_MAKE_NONCOPYABLE(Cache); | 28 WTF_MAKE_NONCOPYABLE(Cache); |
| 30 public: | 29 public: |
| 31 static PassRefPtrWillBeRawPtr<Cache> fromWebServiceWorkerCache(WebServiceWor
kerCache*); | 30 static Cache* fromWebServiceWorkerCache(WebServiceWorkerCache*); |
| 32 | 31 |
| 33 // From Cache.idl: | 32 // From Cache.idl: |
| 34 ScriptPromise match(ScriptState*, Request*, const Dictionary& queryParams); | 33 ScriptPromise match(ScriptState*, Request*, const Dictionary& queryParams); |
| 35 ScriptPromise match(ScriptState*, const String&, const Dictionary& queryPara
ms); | 34 ScriptPromise match(ScriptState*, const String&, const Dictionary& queryPara
ms); |
| 36 ScriptPromise matchAll(ScriptState*, Request*, const Dictionary& queryParams
); | 35 ScriptPromise matchAll(ScriptState*, Request*, const Dictionary& queryParams
); |
| 37 ScriptPromise matchAll(ScriptState*, const String&, const Dictionary& queryP
arams); | 36 ScriptPromise matchAll(ScriptState*, const String&, const Dictionary& queryP
arams); |
| 38 ScriptPromise add(ScriptState*, Request*); | 37 ScriptPromise add(ScriptState*, Request*); |
| 39 ScriptPromise add(ScriptState*, const String&); | 38 ScriptPromise add(ScriptState*, const String&); |
| 40 ScriptPromise addAll(ScriptState*, const Vector<ScriptValue>&); | 39 ScriptPromise addAll(ScriptState*, const Vector<ScriptValue>&); |
| 41 ScriptPromise deleteFunction(ScriptState*, Request*, const Dictionary& query
Params); | 40 ScriptPromise deleteFunction(ScriptState*, Request*, const Dictionary& query
Params); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 52 | 51 |
| 53 private: | 52 private: |
| 54 explicit Cache(WebServiceWorkerCache* webCache); | 53 explicit Cache(WebServiceWorkerCache* webCache); |
| 55 | 54 |
| 56 WebServiceWorkerCache const* ALLOW_UNUSED m_webCache; | 55 WebServiceWorkerCache const* ALLOW_UNUSED m_webCache; |
| 57 }; | 56 }; |
| 58 | 57 |
| 59 } // namespace blink | 58 } // namespace blink |
| 60 | 59 |
| 61 #endif // Cache_h | 60 #endif // Cache_h |
| OLD | NEW |