| 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/Cache.h" | |
| 7 | |
| 8 #include "bindings/v8/ScriptPromise.h" | |
| 9 #include "bindings/v8/ScriptPromiseResolver.h" | |
| 10 #include "core/dom/DOMError.h" | |
| 11 #include "core/dom/ExceptionCode.h" | |
| 12 #include "platform/NotImplemented.h" | |
| 13 | |
| 14 namespace WebCore { | |
| 15 | |
| 16 PassRefPtr<Cache> Cache::create(const Vector<String>& urlStrings) | |
| 17 { | |
| 18 RefPtr<Cache> cache = adoptRef(new Cache); | |
| 19 // FIXME: Implement. | |
| 20 notImplemented(); | |
| 21 return cache; | |
| 22 } | |
| 23 | |
| 24 Cache::~Cache() | |
| 25 { | |
| 26 } | |
| 27 | |
| 28 ScriptPromise Cache::match(ScriptState* scriptState, const String& urlString) | |
| 29 { | |
| 30 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); | |
| 31 ScriptPromise promise = resolver->promise(); | |
| 32 | |
| 33 // FIXME: Implement. | |
| 34 notImplemented(); | |
| 35 resolver->reject(DOMError::create(NotSupportedError)); | |
| 36 return promise; | |
| 37 } | |
| 38 | |
| 39 ScriptPromise Cache::ready(ScriptState* scriptState) | |
| 40 { | |
| 41 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); | |
| 42 ScriptPromise promise = resolver->promise(); | |
| 43 | |
| 44 // FIXME: Implement. | |
| 45 notImplemented(); | |
| 46 resolver->reject(DOMError::create(NotSupportedError)); | |
| 47 return promise; | |
| 48 } | |
| 49 | |
| 50 Cache::Cache() | |
| 51 { | |
| 52 ScriptWrappable::init(this); | |
| 53 } | |
| 54 | |
| 55 } // namespace WebCore | |
| OLD | NEW |