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 // FIXME: Blink doesn't support dictionary definitions. For now, we can use the | |
6 // Dictionary interface. See http://crbug.com/321462 | |
7 | |
8 // dictionary QueryParams { | |
9 // boolean ignoreSearch; | |
10 // boolean ignoreMethod; | |
11 // boolean ignoreVary; | |
12 // boolean prefixMatch; | |
13 // }; | |
14 | |
15 // dictionary CacheBatchOperation { | |
16 // DOMString type; | |
17 // Request request; | |
18 // Response response; | |
19 // QueryParams matchParams; | |
20 // }; | |
21 | |
22 [ | |
23 WillBeGarbageCollected, | |
24 NoInterfaceObject, | |
25 Exposed=ServiceWorker, | |
26 RuntimeEnabled=ServiceWorker, | |
27 ] interface FetchStore { | |
28 // FIXME: Blink doesn't support union types, we use overrides instead. See htt p://crbug.com/240176 | |
29 | |
30 // [CallWith=ScriptState] Promise match((Request or ScalarValueString) request , optional Dictionary queryParams); | |
31 [CallWith=ScriptState] Promise match(Request request, optional Dictionary quer yParams); | |
32 [CallWith=ScriptState] Promise match(ScalarValueString request, optional Dicti onary queryParams); | |
33 | |
34 // [CallWith=ScriptState] Promise matchAll((Request or ScalarValueString) requ est, optional Dictionary queryParams); | |
35 [CallWith=ScriptState] Promise matchAll(Request request, optional Dictionary q ueryParams); | |
36 [CallWith=ScriptState] Promise matchAll(ScalarValueString request, optional Di ctionary queryParams); | |
37 | |
38 // FIXME: The lack of union type support means that "..." won't work quite rig ht for the override expansion, so we use a | |
39 // 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
| |
40 // [CallWith=ScriptState] Promise add((Request or ScalarValueString)... reques ts); | |
41 [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
| |
42 | |
43 // [CallWith=ScriptState] Promise put((Request or ScalarValueString) request, Response response); | |
44 [CallWith=ScriptState] Promise put(Request request, Response response); | |
45 [CallWith=ScriptState] Promise put(ScalarValueString request, Response respons e); | |
46 | |
47 // [CallWith=ScriptState] Promise delete((Request or ScalarValueString) reques t, optional Dictionary queryParams); | |
48 [CallWith=ScriptState, ImplementedAs=deleteFunction] Promise delete(Request re quest, optional Dictionary queryParams); | |
49 [CallWith=ScriptState, ImplementedAs=deleteFunction] Promise delete(ScalarValu eString request, optional Dictionary queryParams); | |
50 | |
51 // [CallWith=ScriptState] Promise keys(optional (Request or ScalarValueString) request, optional Dictionary queryParams); | |
52 [CallWith=ScriptState] Promise keys(optional Request request, optional Diction ary queryParams); | |
53 [CallWith=ScriptState] Promise keys(ScalarValueString request, optional Dictio nary queryParams); | |
54 | |
55 [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
| |
56 }; | |
OLD | NEW |