Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: Source/modules/serviceworkers/Cache.idl

Issue 723643002: Service Worker: Include promise types in IDL (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/serviceworkers/Body.idl ('k') | Source/modules/serviceworkers/CacheStorage.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // See https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.htm l#cache 5 // See https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.htm l#cache
6 6
7 typedef (Request or USVString) RequestInfo; 7 typedef (Request or USVString) RequestInfo;
8 8
9 [ 9 [
10 GarbageCollected, 10 GarbageCollected,
11 Exposed=ServiceWorker, 11 Exposed=ServiceWorker,
12 RuntimeEnabled=ServiceWorkerCache, 12 RuntimeEnabled=ServiceWorkerCache,
13 TypeChecking=Interface, 13 TypeChecking=Interface,
14 ] interface Cache { 14 ] interface Cache {
15 [CallWith=ScriptState, RaisesException] Promise match(RequestInfo request, o ptional CacheQueryOptions options); 15 [CallWith=ScriptState, RaisesException] Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
16 16
17 // FIXME: Implement matchAll(): http://crbug.com/428363 17 // FIXME: Implement matchAll(): http://crbug.com/428363
18 // FIXME: First argument of matchAll() should be optional: http://crbug.com/ 425459 18 // FIXME: First argument of matchAll() should be optional: http://crbug.com/ 425459
19 // [CallWith=ScriptState, RaisesException] Promise matchAll(RequestInfo requ est, optional CacheQueryOptions options); 19 // [CallWith=ScriptState, RaisesException] Promise<sequence<Response>> match All(RequestInfo request, optional CacheQueryOptions options);
20 20
21 // FIXME: Implement add(): http://crbug.com/427652 21 // FIXME: Implement add(): http://crbug.com/427652
22 // [CallWith=ScriptState, RaisesException] Promise add(RequestInfo request); 22 // [CallWith=ScriptState, RaisesException] Promise<void> add(RequestInfo req uest);
23 23
24 // FIXME: Implement addAll(): http://crbug.com/427652 24 // FIXME: Implement addAll(): http://crbug.com/427652
25 // FIXME: Sequences of Unions are not yet supported, instead bind a generic type. http://crbug.com/240176 25 // [CallWith=ScriptState] Promise<void> addAll(sequence<RequestInfo> request s);
26 // [CallWith=ScriptState] Promise addAll(sequence<RequestInfo> requests);
27 // [CallWith=ScriptState] Promise addAll(sequence<any> requests);
28 26
29 [CallWith=ScriptState, RaisesException] Promise put(RequestInfo request, Res ponse response); 27 [CallWith=ScriptState, RaisesException] Promise<void> put(RequestInfo reques t, Response response);
30 [CallWith=ScriptState, ImplementedAs=deleteFunction, RaisesException] Promis e delete(RequestInfo request, optional CacheQueryOptions options); 28 [CallWith=ScriptState, ImplementedAs=deleteFunction, RaisesException] Promis e<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
31 [CallWith=ScriptState, RaisesException] Promise keys(optional RequestInfo re quest, optional CacheQueryOptions options); 29 [CallWith=ScriptState, RaisesException] Promise<sequence<Response>> keys(opt ional RequestInfo request, optional CacheQueryOptions options);
32 }; 30 };
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/Body.idl ('k') | Source/modules/serviceworkers/CacheStorage.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698