Chromium Code Reviews| Index: Source/modules/serviceworkers/FetchStore.idl |
| diff --git a/Source/modules/serviceworkers/FetchStore.idl b/Source/modules/serviceworkers/FetchStore.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a1a3d263b972e4c5b38d48fa93f3710bf5042004 |
| --- /dev/null |
| +++ b/Source/modules/serviceworkers/FetchStore.idl |
| @@ -0,0 +1,56 @@ |
| +// 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. |
| + |
| +// FIXME: Blink doesn't support dictionary definitions. For now, we can use the |
| +// Dictionary interface. See http://crbug.com/321462 |
| + |
| +// dictionary QueryParams { |
| +// boolean ignoreSearch; |
| +// boolean ignoreMethod; |
| +// boolean ignoreVary; |
| +// boolean prefixMatch; |
| +// }; |
| + |
| +// dictionary CacheBatchOperation { |
| +// DOMString type; |
| +// Request request; |
| +// Response response; |
| +// QueryParams matchParams; |
| +// }; |
| + |
| +[ |
| + WillBeGarbageCollected, |
| + NoInterfaceObject, |
| + Exposed=ServiceWorker, |
| + RuntimeEnabled=ServiceWorker, |
| +] interface FetchStore { |
| + // FIXME: Blink doesn't support union types, we use overrides instead. See http://crbug.com/240176 |
| + |
| + // [CallWith=ScriptState] Promise match((Request or ScalarValueString) request, optional Dictionary queryParams); |
| + [CallWith=ScriptState] Promise match(Request request, optional Dictionary queryParams); |
| + [CallWith=ScriptState] Promise match(ScalarValueString request, optional Dictionary queryParams); |
| + |
| + // [CallWith=ScriptState] Promise matchAll((Request or ScalarValueString) request, optional Dictionary queryParams); |
| + [CallWith=ScriptState] Promise matchAll(Request request, optional Dictionary queryParams); |
| + [CallWith=ScriptState] Promise matchAll(ScalarValueString request, optional Dictionary queryParams); |
| + |
| + // FIXME: The lack of union type support means that "..." won't work quite right for the override expansion, so we use a |
| + // custom binding here. See http://crbug.com/240176 |
|
falken
2014/07/31 15:28:21
The comment says we use a custom binding, but it l
gavinp
2014/08/06 02:00:05
It's not quite custom, just generic. The use "any.
falken
2014/08/06 04:46:28
Ah I see. "custom binding" made me think of Blink
|
| + // [CallWith=ScriptState] Promise add((Request or ScalarValueString)... requests); |
| + [CallWith=ScriptState] Promise add(any... requests); |
|
falken
2014/07/31 15:28:21
The spec has add and addAll. Why are we different?
gavinp
2014/08/06 02:00:05
Because the spec has been changing many times per
|
| + |
| + // [CallWith=ScriptState] Promise put((Request or ScalarValueString) request, Response response); |
| + [CallWith=ScriptState] Promise put(Request request, Response response); |
| + [CallWith=ScriptState] Promise put(ScalarValueString request, Response response); |
| + |
| + // [CallWith=ScriptState] Promise delete((Request or ScalarValueString) request, optional Dictionary queryParams); |
| + [CallWith=ScriptState, ImplementedAs=deleteFunction] Promise delete(Request request, optional Dictionary queryParams); |
| + [CallWith=ScriptState, ImplementedAs=deleteFunction] Promise delete(ScalarValueString request, optional Dictionary queryParams); |
| + |
| + // [CallWith=ScriptState] Promise keys(optional (Request or ScalarValueString) request, optional Dictionary queryParams); |
| + [CallWith=ScriptState] Promise keys(optional Request request, optional Dictionary queryParams); |
| + [CallWith=ScriptState] Promise keys(ScalarValueString request, optional Dictionary queryParams); |
| + |
| + [CallWith=ScriptState] Promise batch(sequence<Dictionary> batchOperations); |
|
falken
2014/07/31 15:28:21
batch doesn't seem in the spec, what's up?
gavinp
2014/08/06 02:00:05
Ditto
|
| +}; |