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 9ad2ec5fc7b05ea7b7419cc33829dca575ee0687..57683b40428a77c0d9e4c0ba955d639884850b2b 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -5849,9 +5849,20 @@ class DataTransferItem native "*DataTransferItem" { |
@DocsEditable |
Blob getAsFile() native; |
+ @JSName('getAsString') |
@DomName('DataTransferItem.getAsString') |
@DocsEditable |
- void getAsString([StringCallback callback]) native; |
+ void _getAsString([_StringCallback callback]) native; |
+ |
+ @JSName('getAsString') |
+ @DomName('DataTransferItem.getAsString') |
+ @DocsEditable |
+ Future<String> getAsString() { |
+ var completer = new Completer<String>(); |
+ _getAsString( |
+ (value) { completer.complete(value); }); |
+ return completer.future; |
+ } |
@JSName('webkitGetAsEntry') |
@DomName('DataTransferItem.webkitGetAsEntry') |
@@ -6103,83 +6114,117 @@ class DirectoryEntry extends Entry native "*DirectoryEntry" { |
@DomName('DirectoryEntry.getDirectory') |
@DocsEditable |
- void getDirectory(String path, {Map options, EntryCallback successCallback, ErrorCallback errorCallback}) { |
+ void _getDirectory(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) { |
if (?errorCallback) { |
var options_1 = convertDartToNative_Dictionary(options); |
- _getDirectory_1(path, options_1, successCallback, errorCallback); |
+ __getDirectory_1(path, options_1, successCallback, errorCallback); |
return; |
} |
if (?successCallback) { |
var options_2 = convertDartToNative_Dictionary(options); |
- _getDirectory_2(path, options_2, successCallback); |
+ __getDirectory_2(path, options_2, successCallback); |
return; |
} |
if (?options) { |
var options_3 = convertDartToNative_Dictionary(options); |
- _getDirectory_3(path, options_3); |
+ __getDirectory_3(path, options_3); |
return; |
} |
- _getDirectory_4(path); |
+ __getDirectory_4(path); |
return; |
} |
@JSName('getDirectory') |
@DomName('DirectoryEntry.getDirectory') |
@DocsEditable |
- void _getDirectory_1(path, options, EntryCallback successCallback, ErrorCallback errorCallback) native; |
+ void __getDirectory_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native; |
@JSName('getDirectory') |
@DomName('DirectoryEntry.getDirectory') |
@DocsEditable |
- void _getDirectory_2(path, options, EntryCallback successCallback) native; |
+ void __getDirectory_2(path, options, _EntryCallback successCallback) native; |
@JSName('getDirectory') |
@DomName('DirectoryEntry.getDirectory') |
@DocsEditable |
- void _getDirectory_3(path, options) native; |
+ void __getDirectory_3(path, options) native; |
@JSName('getDirectory') |
@DomName('DirectoryEntry.getDirectory') |
@DocsEditable |
- void _getDirectory_4(path) native; |
+ void __getDirectory_4(path) native; |
+ |
+ @JSName('getDirectory') |
+ @DomName('DirectoryEntry.getDirectory') |
+ @DocsEditable |
+ Future<Entry> getDirectory(String path, {Map options}) { |
+ var completer = new Completer<Entry>(); |
+ _getDirectory(path, options : options, |
+ successCallback : (value) { completer.complete(value); }, |
+ errorCallback : (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
@DomName('DirectoryEntry.getFile') |
@DocsEditable |
- void getFile(String path, {Map options, EntryCallback successCallback, ErrorCallback errorCallback}) { |
+ void _getFile(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) { |
if (?errorCallback) { |
var options_1 = convertDartToNative_Dictionary(options); |
- _getFile_1(path, options_1, successCallback, errorCallback); |
+ __getFile_1(path, options_1, successCallback, errorCallback); |
return; |
} |
if (?successCallback) { |
var options_2 = convertDartToNative_Dictionary(options); |
- _getFile_2(path, options_2, successCallback); |
+ __getFile_2(path, options_2, successCallback); |
return; |
} |
if (?options) { |
var options_3 = convertDartToNative_Dictionary(options); |
- _getFile_3(path, options_3); |
+ __getFile_3(path, options_3); |
return; |
} |
- _getFile_4(path); |
+ __getFile_4(path); |
return; |
} |
@JSName('getFile') |
@DomName('DirectoryEntry.getFile') |
@DocsEditable |
- void _getFile_1(path, options, EntryCallback successCallback, ErrorCallback errorCallback) native; |
+ void __getFile_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native; |
+ @JSName('getFile') |
+ @DomName('DirectoryEntry.getFile') |
+ @DocsEditable |
+ void __getFile_2(path, options, _EntryCallback successCallback) native; |
@JSName('getFile') |
@DomName('DirectoryEntry.getFile') |
@DocsEditable |
- void _getFile_2(path, options, EntryCallback successCallback) native; |
+ void __getFile_3(path, options) native; |
@JSName('getFile') |
@DomName('DirectoryEntry.getFile') |
@DocsEditable |
- void _getFile_3(path, options) native; |
+ void __getFile_4(path) native; |
+ |
@JSName('getFile') |
@DomName('DirectoryEntry.getFile') |
@DocsEditable |
- void _getFile_4(path) native; |
+ Future<Entry> getFile(String path, {Map options}) { |
+ var completer = new Completer<Entry>(); |
+ _getFile(path, options : options, |
+ successCallback : (value) { completer.complete(value); }, |
+ errorCallback : (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
+ @JSName('removeRecursively') |
@DomName('DirectoryEntry.removeRecursively') |
@DocsEditable |
- void removeRecursively(VoidCallback successCallback, [ErrorCallback errorCallback]) native; |
+ void _removeRecursively(VoidCallback successCallback, [_ErrorCallback errorCallback]) native; |
+ |
+ @JSName('removeRecursively') |
+ @DomName('DirectoryEntry.removeRecursively') |
+ @DocsEditable |
+ Future removeRecursively() { |
+ var completer = new Completer(); |
+ _removeRecursively( |
+ () { completer.complete(); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -6229,9 +6274,21 @@ class DirectoryEntrySync extends EntrySync native "*DirectoryEntrySync" { |
@DomName('DirectoryReader') |
class DirectoryReader native "*DirectoryReader" { |
+ @JSName('readEntries') |
+ @DomName('DirectoryReader.readEntries') |
+ @DocsEditable |
+ void _readEntries(_EntriesCallback successCallback, [_ErrorCallback errorCallback]) native; |
+ |
+ @JSName('readEntries') |
@DomName('DirectoryReader.readEntries') |
@DocsEditable |
- void readEntries(EntriesCallback successCallback, [ErrorCallback errorCallback]) native; |
+ Future<List<Entry>> readEntries() { |
+ var completer = new Completer<List<Entry>>(); |
+ _readEntries( |
+ (value) { completer.complete(value); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -9867,7 +9924,7 @@ class EntityReference extends Node native "*EntityReference" { |
// WARNING: Do not edit - generated code. |
-typedef void EntriesCallback(List<Entry> entries); |
+typedef void _EntriesCallback(List<Entry> entries); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -9897,25 +9954,85 @@ class Entry native "*Entry" { |
@DocsEditable |
final String name; |
+ @JSName('copyTo') |
+ @DomName('Entry.copyTo') |
+ @DocsEditable |
+ void _copyTo(DirectoryEntry parent, {String name, _EntryCallback successCallback, _ErrorCallback errorCallback}) native; |
+ |
+ @JSName('copyTo') |
@DomName('Entry.copyTo') |
@DocsEditable |
- void copyTo(DirectoryEntry parent, [String name, EntryCallback successCallback, ErrorCallback errorCallback]) native; |
+ Future<Entry> copyTo(DirectoryEntry parent, {String name}) { |
+ var completer = new Completer<Entry>(); |
+ _copyTo(parent, name : name, |
+ successCallback : (value) { completer.complete(value); }, |
+ errorCallback : (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
+ |
+ @JSName('getMetadata') |
+ @DomName('Entry.getMetadata') |
+ @DocsEditable |
+ void _getMetadata(MetadataCallback successCallback, [_ErrorCallback errorCallback]) native; |
+ @JSName('getMetadata') |
@DomName('Entry.getMetadata') |
@DocsEditable |
- void getMetadata(MetadataCallback successCallback, [ErrorCallback errorCallback]) native; |
+ Future<Metadata> getMetadata() { |
+ var completer = new Completer<Metadata>(); |
+ _getMetadata( |
+ (value) { completer.complete(value); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
+ @JSName('getParent') |
@DomName('Entry.getParent') |
@DocsEditable |
- void getParent([EntryCallback successCallback, ErrorCallback errorCallback]) native; |
+ void _getParent([_EntryCallback successCallback, _ErrorCallback errorCallback]) native; |
+ |
+ @JSName('getParent') |
+ @DomName('Entry.getParent') |
+ @DocsEditable |
+ Future<Entry> getParent() { |
+ var completer = new Completer<Entry>(); |
+ _getParent( |
+ (value) { completer.complete(value); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
+ @JSName('moveTo') |
@DomName('Entry.moveTo') |
@DocsEditable |
- void moveTo(DirectoryEntry parent, [String name, EntryCallback successCallback, ErrorCallback errorCallback]) native; |
+ void _moveTo(DirectoryEntry parent, {String name, _EntryCallback successCallback, _ErrorCallback errorCallback}) native; |
+ @JSName('moveTo') |
+ @DomName('Entry.moveTo') |
+ @DocsEditable |
+ Future<Entry> moveTo(DirectoryEntry parent, {String name}) { |
+ var completer = new Completer<Entry>(); |
+ _moveTo(parent, name : name, |
+ successCallback : (value) { completer.complete(value); }, |
+ errorCallback : (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
+ |
+ @JSName('remove') |
@DomName('Entry.remove') |
@DocsEditable |
- void remove(VoidCallback successCallback, [ErrorCallback errorCallback]) native; |
+ void _remove(VoidCallback successCallback, [_ErrorCallback errorCallback]) native; |
+ |
+ @JSName('remove') |
+ @DomName('Entry.remove') |
+ @DocsEditable |
+ Future remove() { |
+ var completer = new Completer(); |
+ _remove( |
+ () { completer.complete(); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
@JSName('toURL') |
@DomName('Entry.toURL') |
@@ -9929,7 +10046,7 @@ class Entry native "*Entry" { |
// WARNING: Do not edit - generated code. |
-typedef void EntryCallback(Entry entry); |
+typedef void _EntryCallback(Entry entry); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -9991,7 +10108,7 @@ class EntrySync native "*EntrySync" { |
// WARNING: Do not edit - generated code. |
-typedef void ErrorCallback(FileError error); |
+typedef void _ErrorCallback(FileError error); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -10463,7 +10580,7 @@ class File extends Blob native "*File" { |
// WARNING: Do not edit - generated code. |
-typedef void FileCallback(File file); |
+typedef void _FileCallback(File file); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -10473,13 +10590,37 @@ typedef void FileCallback(File file); |
@DomName('FileEntry') |
class FileEntry extends Entry native "*FileEntry" { |
+ @JSName('createWriter') |
+ @DomName('FileEntry.createWriter') |
+ @DocsEditable |
+ void _createWriter(_FileWriterCallback successCallback, [_ErrorCallback errorCallback]) native; |
+ |
+ @JSName('createWriter') |
@DomName('FileEntry.createWriter') |
@DocsEditable |
- void createWriter(FileWriterCallback successCallback, [ErrorCallback errorCallback]) native; |
+ Future<FileWriter> createWriter() { |
+ var completer = new Completer<FileWriter>(); |
+ _createWriter( |
+ (value) { completer.complete(value); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
+ |
+ @JSName('file') |
+ @DomName('FileEntry.file') |
+ @DocsEditable |
+ void _file(_FileCallback successCallback, [_ErrorCallback errorCallback]) native; |
+ @JSName('file') |
@DomName('FileEntry.file') |
@DocsEditable |
- void file(FileCallback successCallback, [ErrorCallback errorCallback]) native; |
+ Future<File> file() { |
+ var completer = new Completer<File>(); |
+ _file( |
+ (value) { completer.complete(value); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -10966,7 +11107,7 @@ class FileSystem native "*DOMFileSystem" { |
// WARNING: Do not edit - generated code. |
-typedef void FileSystemCallback(FileSystem fileSystem); |
+typedef void _FileSystemCallback(FileSystem fileSystem); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -11102,7 +11243,7 @@ class FileWriter extends EventTarget native "*FileWriter" { |
// WARNING: Do not edit - generated code. |
-typedef void FileWriterCallback(FileWriter fileWriter); |
+typedef void _FileWriterCallback(FileWriter fileWriter); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -12970,7 +13111,7 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" { |
*/ |
@DomName('XMLHttpRequest.open') |
@DocsEditable |
- void open(String method, String url, [bool async, String user, String password]) native; |
+ void open(String method, String url, {bool async, String user, String password}) native; |
/** |
* Specify a particular MIME type (such as `text/xml`) desired for the |
@@ -13625,7 +13766,7 @@ class InputElement extends Element implements |
@DomName('HTMLInputElement.setRangeText') |
@DocsEditable |
- void setRangeText(String replacement, [int start, int end, String selectionMode]) native; |
+ void setRangeText(String replacement, {int start, int end, String selectionMode}) native; |
@DomName('HTMLInputElement.setSelectionRange') |
@DocsEditable |
@@ -17859,9 +18000,20 @@ class Notification extends EventTarget native "*Notification" { |
@DocsEditable |
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native; |
+ @JSName('requestPermission') |
@DomName('Notification.requestPermission') |
@DocsEditable |
- static void requestPermission([NotificationPermissionCallback callback]) native; |
+ static void _requestPermission([_NotificationPermissionCallback callback]) native; |
+ |
+ @JSName('requestPermission') |
+ @DomName('Notification.requestPermission') |
+ @DocsEditable |
+ static Future<String> requestPermission() { |
+ var completer = new Completer<String>(); |
+ _requestPermission( |
+ (value) { completer.complete(value); }); |
+ return completer.future; |
+ } |
@DomName('Notification.show') |
@DocsEditable |
@@ -17916,9 +18068,20 @@ class NotificationCenter native "*NotificationCenter" { |
@DocsEditable |
Notification createNotification(String iconUrl, String title, String body) native; |
+ @JSName('requestPermission') |
+ @DomName('NotificationCenter.requestPermission') |
+ @DocsEditable |
+ void _requestPermission(VoidCallback callback) native; |
+ |
+ @JSName('requestPermission') |
@DomName('NotificationCenter.requestPermission') |
@DocsEditable |
- void requestPermission(VoidCallback callback) native; |
+ Future requestPermission() { |
+ var completer = new Completer(); |
+ _requestPermission( |
+ () { completer.complete(); }); |
+ return completer.future; |
+ } |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -17927,7 +18090,7 @@ class NotificationCenter native "*NotificationCenter" { |
// WARNING: Do not edit - generated code. |
-typedef void NotificationPermissionCallback(String permission); |
+typedef void _NotificationPermissionCallback(String permission); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -18671,7 +18834,7 @@ class QuoteElement extends Element native "*HTMLQuoteElement" { |
// WARNING: Do not edit - generated code. |
-typedef void RtcErrorCallback(String errorInformation); |
+typedef void _RtcErrorCallback(String errorInformation); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -18679,7 +18842,7 @@ typedef void RtcErrorCallback(String errorInformation); |
// WARNING: Do not edit - generated code. |
-typedef void RtcSessionDescriptionCallback(RtcSessionDescription sdp); |
+typedef void _RtcSessionDescriptionCallback(RtcSessionDescription sdp); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -19204,23 +19367,34 @@ class RtcPeerConnection extends EventTarget native "*RTCPeerConnection" { |
@DomName('RTCPeerConnection.createAnswer') |
@DocsEditable |
- void createAnswer(RtcSessionDescriptionCallback successCallback, [RtcErrorCallback failureCallback, Map mediaConstraints]) { |
+ void _createAnswer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map mediaConstraints]) { |
if (?mediaConstraints) { |
var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints); |
- _createAnswer_1(successCallback, failureCallback, mediaConstraints_1); |
+ __createAnswer_1(successCallback, failureCallback, mediaConstraints_1); |
return; |
} |
- _createAnswer_2(successCallback, failureCallback); |
+ __createAnswer_2(successCallback, failureCallback); |
return; |
} |
@JSName('createAnswer') |
@DomName('RTCPeerConnection.createAnswer') |
@DocsEditable |
- void _createAnswer_1(RtcSessionDescriptionCallback successCallback, RtcErrorCallback failureCallback, mediaConstraints) native; |
+ void __createAnswer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native; |
@JSName('createAnswer') |
@DomName('RTCPeerConnection.createAnswer') |
@DocsEditable |
- void _createAnswer_2(RtcSessionDescriptionCallback successCallback, RtcErrorCallback failureCallback) native; |
+ void __createAnswer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native; |
+ |
+ @JSName('createAnswer') |
+ @DomName('RTCPeerConnection.createAnswer') |
+ @DocsEditable |
+ Future<RtcSessionDescription> createAnswer([Map mediaConstraints]) { |
+ var completer = new Completer<RtcSessionDescription>(); |
+ _createAnswer(mediaConstraints, |
+ (value) { completer.complete(value); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
@JSName('createDTMFSender') |
@DomName('RTCPeerConnection.createDTMFSender') |
@@ -19247,23 +19421,34 @@ class RtcPeerConnection extends EventTarget native "*RTCPeerConnection" { |
@DomName('RTCPeerConnection.createOffer') |
@DocsEditable |
- void createOffer(RtcSessionDescriptionCallback successCallback, [RtcErrorCallback failureCallback, Map mediaConstraints]) { |
+ void _createOffer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map mediaConstraints]) { |
if (?mediaConstraints) { |
var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints); |
- _createOffer_1(successCallback, failureCallback, mediaConstraints_1); |
+ __createOffer_1(successCallback, failureCallback, mediaConstraints_1); |
return; |
} |
- _createOffer_2(successCallback, failureCallback); |
+ __createOffer_2(successCallback, failureCallback); |
return; |
} |
@JSName('createOffer') |
@DomName('RTCPeerConnection.createOffer') |
@DocsEditable |
- void _createOffer_1(RtcSessionDescriptionCallback successCallback, RtcErrorCallback failureCallback, mediaConstraints) native; |
+ void __createOffer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native; |
@JSName('createOffer') |
@DomName('RTCPeerConnection.createOffer') |
@DocsEditable |
- void _createOffer_2(RtcSessionDescriptionCallback successCallback, RtcErrorCallback failureCallback) native; |
+ void __createOffer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native; |
+ |
+ @JSName('createOffer') |
+ @DomName('RTCPeerConnection.createOffer') |
+ @DocsEditable |
+ Future<RtcSessionDescription> createOffer([Map mediaConstraints]) { |
+ var completer = new Completer<RtcSessionDescription>(); |
+ _createOffer(mediaConstraints, |
+ (value) { completer.complete(value); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
@DomName('RTCPeerConnection.dispatchEvent') |
@DocsEditable |
@@ -19290,13 +19475,37 @@ class RtcPeerConnection extends EventTarget native "*RTCPeerConnection" { |
@DocsEditable |
void removeStream(MediaStream stream) native; |
+ @JSName('setLocalDescription') |
+ @DomName('RTCPeerConnection.setLocalDescription') |
+ @DocsEditable |
+ void _setLocalDescription(RtcSessionDescription description, [VoidCallback successCallback, _RtcErrorCallback failureCallback]) native; |
+ |
+ @JSName('setLocalDescription') |
@DomName('RTCPeerConnection.setLocalDescription') |
@DocsEditable |
- void setLocalDescription(RtcSessionDescription description, [VoidCallback successCallback, RtcErrorCallback failureCallback]) native; |
+ Future setLocalDescription(RtcSessionDescription description) { |
+ var completer = new Completer(); |
+ _setLocalDescription(description, |
+ () { completer.complete(); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
+ |
+ @JSName('setRemoteDescription') |
+ @DomName('RTCPeerConnection.setRemoteDescription') |
+ @DocsEditable |
+ void _setRemoteDescription(RtcSessionDescription description, [VoidCallback successCallback, _RtcErrorCallback failureCallback]) native; |
+ @JSName('setRemoteDescription') |
@DomName('RTCPeerConnection.setRemoteDescription') |
@DocsEditable |
- void setRemoteDescription(RtcSessionDescription description, [VoidCallback successCallback, RtcErrorCallback failureCallback]) native; |
+ Future setRemoteDescription(RtcSessionDescription description) { |
+ var completer = new Completer(); |
+ _setRemoteDescription(description, |
+ () { completer.complete(); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
@DomName('RTCPeerConnection.updateIce') |
@DocsEditable |
@@ -20863,13 +21072,37 @@ class StorageInfo native "*StorageInfo" { |
static const int TEMPORARY = 0; |
+ @JSName('queryUsageAndQuota') |
@DomName('StorageInfo.queryUsageAndQuota') |
@DocsEditable |
- void queryUsageAndQuota(int storageType, [StorageInfoUsageCallback usageCallback, StorageInfoErrorCallback errorCallback]) native; |
+ void _queryUsageAndQuota(int storageType, [_StorageInfoUsageCallback usageCallback, _StorageInfoErrorCallback errorCallback]) native; |
+ @JSName('queryUsageAndQuota') |
+ @DomName('StorageInfo.queryUsageAndQuota') |
+ @DocsEditable |
+ Future<int> queryUsageAndQuota(int storageType) { |
+ var completer = new Completer<int>(); |
+ _queryUsageAndQuota(storageType, |
+ (value) { completer.complete(value); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
+ |
+ @JSName('requestQuota') |
+ @DomName('StorageInfo.requestQuota') |
+ @DocsEditable |
+ void _requestQuota(int storageType, int newQuotaInBytes, [StorageInfoQuotaCallback quotaCallback, _StorageInfoErrorCallback errorCallback]) native; |
+ |
+ @JSName('requestQuota') |
@DomName('StorageInfo.requestQuota') |
@DocsEditable |
- void requestQuota(int storageType, int newQuotaInBytes, [StorageInfoQuotaCallback quotaCallback, StorageInfoErrorCallback errorCallback]) native; |
+ Future<int> requestQuota(int storageType, int newQuotaInBytes) { |
+ var completer = new Completer<int>(); |
+ _requestQuota(storageType, newQuotaInBytes, |
+ (value) { completer.complete(value); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -20878,7 +21111,7 @@ class StorageInfo native "*StorageInfo" { |
// WARNING: Do not edit - generated code. |
-typedef void StorageInfoErrorCallback(DomException error); |
+typedef void _StorageInfoErrorCallback(DomException error); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -20894,7 +21127,7 @@ typedef void StorageInfoQuotaCallback(int grantedQuotaInBytes); |
// WARNING: Do not edit - generated code. |
-typedef void StorageInfoUsageCallback(int currentUsageInBytes, int currentQuotaInBytes); |
+typedef void _StorageInfoUsageCallback(int currentUsageInBytes, int currentQuotaInBytes); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -20902,7 +21135,7 @@ typedef void StorageInfoUsageCallback(int currentUsageInBytes, int currentQuotaI |
// WARNING: Do not edit - generated code. |
-typedef void StringCallback(String data); |
+typedef void _StringCallback(String data); |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -26349,14 +26582,40 @@ class Window extends EventTarget implements WindowBase native "@*DOMWindow" { |
@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('DOMWindow.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('webkitResolveLocalFileSystemURL') |
+ @DomName('DOMWindow.webkitResolveLocalFileSystemURL') |
+ @DocsEditable |
+ @SupportedBrowser(SupportedBrowser.CHROME) |
+ @Experimental |
+ void _resolveLocalFileSystemUrl(String url, _EntryCallback successCallback, [_ErrorCallback errorCallback]) native; |
@JSName('webkitResolveLocalFileSystemURL') |
@DomName('DOMWindow.webkitResolveLocalFileSystemURL') |
@DocsEditable |
@SupportedBrowser(SupportedBrowser.CHROME) |
@Experimental |
- void resolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native; |
+ Future<Entry> resolveLocalFileSystemUrl(String url) { |
+ var completer = new Completer<Entry>(); |
+ _resolveLocalFileSystemUrl(url, |
+ (value) { completer.complete(value); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
@DomName('DOMWindow.onDOMContentLoaded') |
@DocsEditable |
@@ -26717,7 +26976,7 @@ 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('webkitRequestFileSystemSync') |
@DomName('WorkerContext.webkitRequestFileSystemSync') |
@@ -26738,7 +26997,20 @@ class WorkerContext extends EventTarget native "*WorkerContext" { |
@DocsEditable |
@SupportedBrowser(SupportedBrowser.CHROME) |
@Experimental |
- void resolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native; |
+ void _resolveLocalFileSystemUrl(String url, _EntryCallback successCallback, [_ErrorCallback errorCallback]) native; |
+ |
+ @JSName('webkitResolveLocalFileSystemURL') |
+ @DomName('WorkerContext.webkitResolveLocalFileSystemURL') |
+ @DocsEditable |
+ @SupportedBrowser(SupportedBrowser.CHROME) |
+ @Experimental |
+ Future<Entry> resolveLocalFileSystemUrl(String url) { |
+ var completer = new Completer<Entry>(); |
+ _resolveLocalFileSystemUrl(url, |
+ (value) { completer.complete(value); }, |
+ (error) { completer.completeError(error); }); |
+ return completer.future; |
+ } |
@DomName('WorkerContext.onerror') |
@DocsEditable |