| 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/CacheStorage.h" | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | |
| 9 #include "bindings/core/v8/ScriptState.h" | |
| 10 | |
| 11 namespace WebCore { | |
| 12 | |
| 13 PassRefPtrWillBeRawPtr<CacheStorage> CacheStorage::create() | |
| 14 { | |
| 15 return adoptRefWillBeNoop(new CacheStorage()); | |
| 16 } | |
| 17 | |
| 18 // FIXME: Implement every one of these methods. | |
| 19 ScriptPromise CacheStorage::createFunction(ScriptState* scriptState, const Strin
g& key) | |
| 20 { | |
| 21 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); | |
| 22 const ScriptPromise promise = resolver->promise(); | |
| 23 | |
| 24 resolver->reject("not implemented"); | |
| 25 | |
| 26 return promise; | |
| 27 } | |
| 28 | |
| 29 ScriptPromise CacheStorage::rename(ScriptState* scriptState, const String& oldKe
y, const String& newKey) | |
| 30 { | |
| 31 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); | |
| 32 const ScriptPromise promise = resolver->promise(); | |
| 33 | |
| 34 resolver->reject("not implemented"); | |
| 35 | |
| 36 return promise; | |
| 37 } | |
| 38 | |
| 39 ScriptPromise CacheStorage::get(ScriptState* scriptState, const String& key) | |
| 40 { | |
| 41 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); | |
| 42 const ScriptPromise promise = resolver->promise(); | |
| 43 | |
| 44 resolver->reject("not implemented"); | |
| 45 | |
| 46 return promise; | |
| 47 } | |
| 48 | |
| 49 ScriptPromise CacheStorage::deleteFunction(ScriptState* scriptState, const Strin
g& key) | |
| 50 { | |
| 51 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); | |
| 52 const ScriptPromise promise = resolver->promise(); | |
| 53 | |
| 54 resolver->reject("not implemented"); | |
| 55 | |
| 56 return promise; | |
| 57 } | |
| 58 | |
| 59 ScriptPromise CacheStorage::keys(ScriptState* scriptState) | |
| 60 { | |
| 61 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); | |
| 62 const ScriptPromise promise = resolver->promise(); | |
| 63 | |
| 64 resolver->reject("not implemented"); | |
| 65 | |
| 66 return promise; | |
| 67 } | |
| 68 | |
| 69 CacheStorage::CacheStorage() | |
| 70 { | |
| 71 ScriptWrappable::init(this); | |
| 72 } | |
| 73 | |
| 74 } // namespace WebCore | |
| OLD | NEW |