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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 12566025: Futureify requestFileSystem in WorkerContext. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 9e734b8053de22a76cc226361806fee536a53b6a..95d5d2b9734f4e41a1ca0362b182fa59107a59ce 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -27184,7 +27184,20 @@ class WorkerContext extends EventTarget native "*WorkerContext" {
@DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@Experimental
- void requestFileSystem(int type, int size, [_FileSystemCallback successCallback, _ErrorCallback errorCallback]) native;
+ void _requestFileSystem(int type, int size, [_FileSystemCallback successCallback, _ErrorCallback errorCallback]) native;
+
+ @JSName('webkitRequestFileSystem')
+ @DomName('WorkerContext.webkitRequestFileSystem')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @Experimental
+ Future<FileSystem> requestFileSystem(int type, int size) {
+ var completer = new Completer<FileSystem>();
+ _requestFileSystem(type, size,
+ (value) { completer.complete(value); },
+ (error) { completer.completeError(error); });
+ return completer.future;
+ }
@JSName('webkitRequestFileSystemSync')
@DomName('WorkerContext.webkitRequestFileSystemSync')
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698