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 #include "config.h" |
| 6 #include "modules/serviceworkers/FetchStore.h" |
| 7 |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 9 #include "bindings/core/v8/ScriptState.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 namespace { |
| 14 |
| 15 ScriptPromise RejectAsNotImplemented(ScriptState* scriptState) |
| 16 { |
| 17 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); |
| 18 const ScriptPromise promise = resolver->promise(); |
| 19 resolver->reject("not implemented"); |
| 20 |
| 21 return promise; |
| 22 } |
| 23 |
| 24 } |
| 25 |
| 26 PassRefPtrWillBeRawPtr<FetchStore> FetchStore::create(int fetchStoreID) |
| 27 { |
| 28 return adoptRefWillBeNoop(new FetchStore(fetchStoreID)); |
| 29 } |
| 30 |
| 31 // FIXME: Implement these methods. |
| 32 ScriptPromise FetchStore::match(ScriptState* scriptState, Request* request, cons
t Dictionary& queryParams) |
| 33 { |
| 34 return RejectAsNotImplemented(scriptState); |
| 35 } |
| 36 |
| 37 ScriptPromise FetchStore::match(ScriptState* scriptState, const String& requestS
tring, const Dictionary& queryParams) |
| 38 { |
| 39 return RejectAsNotImplemented(scriptState); |
| 40 } |
| 41 |
| 42 ScriptPromise FetchStore::FetchStore::matchAll(ScriptState* scriptState, Request
* request, const Dictionary& queryParams) |
| 43 { |
| 44 return RejectAsNotImplemented(scriptState); |
| 45 } |
| 46 |
| 47 ScriptPromise FetchStore::matchAll(ScriptState* scriptState, const String& reque
stString, const Dictionary& queryParams) |
| 48 { |
| 49 return RejectAsNotImplemented(scriptState); |
| 50 } |
| 51 |
| 52 ScriptPromise FetchStore::add(ScriptState* scriptState, const WillBeHeapVector<S
criptValue>& rawRequests) |
| 53 { |
| 54 return RejectAsNotImplemented(scriptState); |
| 55 } |
| 56 |
| 57 ScriptPromise FetchStore::deleteFunction(ScriptState* scriptState, Request* requ
est, const Dictionary& queryParams) |
| 58 { |
| 59 return RejectAsNotImplemented(scriptState); |
| 60 } |
| 61 |
| 62 ScriptPromise FetchStore::deleteFunction(ScriptState* scriptState, const String&
requestString, const Dictionary& queryParams) |
| 63 { |
| 64 return RejectAsNotImplemented(scriptState); |
| 65 } |
| 66 |
| 67 ScriptPromise FetchStore::put(ScriptState* scriptState, Request* request, Respon
se*) |
| 68 { |
| 69 return RejectAsNotImplemented(scriptState); |
| 70 } |
| 71 |
| 72 ScriptPromise FetchStore::put(ScriptState* scriptState, const String& requestStr
ing, Response*) |
| 73 { |
| 74 return RejectAsNotImplemented(scriptState); |
| 75 } |
| 76 |
| 77 ScriptPromise FetchStore::keys(ScriptState* scriptState) |
| 78 { |
| 79 return RejectAsNotImplemented(scriptState); |
| 80 } |
| 81 |
| 82 ScriptPromise FetchStore::keys(ScriptState* scriptState, Request* request, const
Dictionary& queryParams) |
| 83 { |
| 84 return RejectAsNotImplemented(scriptState); |
| 85 } |
| 86 |
| 87 ScriptPromise FetchStore::keys(ScriptState* scriptState, const String& requestSt
ring, const Dictionary& queryParams) |
| 88 { |
| 89 return RejectAsNotImplemented(scriptState); |
| 90 } |
| 91 |
| 92 ScriptPromise FetchStore::batch(ScriptState* scriptState, const Vector<Dictionar
y>& queryParams) |
| 93 { |
| 94 return RejectAsNotImplemented(scriptState); |
| 95 } |
| 96 |
| 97 FetchStore::FetchStore(int fetchStoreID) : m_fetchStoreID(fetchStoreID) |
| 98 { |
| 99 ScriptWrappable::init(this); |
| 100 } |
| 101 |
| 102 } // namespace blink |
OLD | NEW |