Chromium Code Reviews| Index: Source/modules/serviceworkers/Cache.cpp |
| diff --git a/Source/modules/serviceworkers/Cache.cpp b/Source/modules/serviceworkers/Cache.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1c823ff688ccc536f859187892feb17042074399 |
| --- /dev/null |
| +++ b/Source/modules/serviceworkers/Cache.cpp |
| @@ -0,0 +1,107 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "config.h" |
| +#include "modules/serviceworkers/Cache.h" |
| + |
| +#include "bindings/core/v8/ScriptPromiseResolver.h" |
| +#include "bindings/core/v8/ScriptState.h" |
| + |
| +namespace blink { |
| + |
| +namespace { |
| + |
| +ScriptPromise RejectAsNotImplemented(ScriptState* scriptState) |
|
falken
2014/08/06 04:46:28
blink function names start with lowercase
gavinp
2014/08/08 19:55:26
Done.
|
| +{ |
| + RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState); |
| + const ScriptPromise promise = resolver->promise(); |
| + resolver->reject("not implemented"); |
| + |
| + return promise; |
| +} |
| + |
| +} |
| + |
| +PassRefPtrWillBeRawPtr<Cache> Cache::fromWebServiceWorkerCache(WebServiceWorkerCache* webCache) |
| +{ |
| + return adoptRefWillBeNoop(new Cache(webCache)); |
| +} |
| + |
| +// FIXME: Implement these methods. |
| +ScriptPromise Cache::match(ScriptState* scriptState, Request* request, const Dictionary& queryParams) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::match(ScriptState* scriptState, const String& requestString, const Dictionary& queryParams) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::matchAll(ScriptState* scriptState, Request* request, const Dictionary& queryParams) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::matchAll(ScriptState* scriptState, const String& requestString, const Dictionary& queryParams) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::add(ScriptState* scriptState, Request* request) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::add(ScriptState* scriptState, const String& requestString) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::addAll(ScriptState* scriptState, const WillBeHeapVector<ScriptValue>& rawRequests) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::deleteFunction(ScriptState* scriptState, Request* request, const Dictionary& queryParams) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::deleteFunction(ScriptState* scriptState, const String& requestString, const Dictionary& queryParams) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::put(ScriptState* scriptState, Request* request, Response*) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::put(ScriptState* scriptState, const String& requestString, Response*) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::keys(ScriptState* scriptState) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::keys(ScriptState* scriptState, Request* request, const Dictionary& queryParams) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +ScriptPromise Cache::keys(ScriptState* scriptState, const String& requestString, const Dictionary& queryParams) |
| +{ |
| + return RejectAsNotImplemented(scriptState); |
| +} |
| + |
| +Cache::Cache(WebServiceWorkerCache* webCache) : m_webCache(webCache) |
| +{ |
| + ScriptWrappable::init(this); |
| +} |
| + |
| +} // namespace blink |