| OLD | NEW |
| 1 library dart.dom.indexed_db; | 1 library dart.dom.indexed_db; |
| 2 | 2 |
| 3 import 'dart:async'; | 3 import 'dart:async'; |
| 4 import 'dart:html'; | 4 import 'dart:html'; |
| 5 import 'dart:html_common'; | 5 import 'dart:html_common'; |
| 6 import 'dart:nativewrappers'; | 6 import 'dart:nativewrappers'; |
| 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 8 // for details. All rights reserved. Use of this source code is governed by a | 8 // for details. All rights reserved. Use of this source code is governed by a |
| 9 // BSD-style license that can be found in the LICENSE file. | 9 // BSD-style license that can be found in the LICENSE file. |
| 10 | 10 |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 272 |
| 273 @DomName('IDBFactory.deleteDatabase') | 273 @DomName('IDBFactory.deleteDatabase') |
| 274 Future<IdbFactory> deleteDatabase(String name, | 274 Future<IdbFactory> deleteDatabase(String name, |
| 275 {void onBlocked(Event)}) { | 275 {void onBlocked(Event)}) { |
| 276 try { | 276 try { |
| 277 var request = $dom_deleteDatabase(name); | 277 var request = $dom_deleteDatabase(name); |
| 278 | 278 |
| 279 if (onBlocked != null) { | 279 if (onBlocked != null) { |
| 280 request.onBlocked.listen(onBlocked); | 280 request.onBlocked.listen(onBlocked); |
| 281 } | 281 } |
| 282 return _completeRequest(request); | 282 var completer = new Completer.sync(); |
| 283 request.onSuccess.listen((e) { |
| 284 completer.complete(this); |
| 285 }); |
| 286 request.onError.listen((e) { |
| 287 completer.completeError(e); |
| 288 }); |
| 289 return completer.future; |
| 283 } catch (e, stacktrace) { | 290 } catch (e, stacktrace) { |
| 284 return new Future.error(e, stacktrace); | 291 return new Future.error(e, stacktrace); |
| 285 } | 292 } |
| 286 } | 293 } |
| 287 | 294 |
| 288 @DomName('IDBFactory.getDatabaseNames') | 295 @DomName('IDBFactory.getDatabaseNames') |
| 289 @SupportedBrowser(SupportedBrowser.CHROME) | 296 @SupportedBrowser(SupportedBrowser.CHROME) |
| 290 @Experimental | 297 @Experimental |
| 291 Future<List<String>> getDatabaseNames() { | 298 Future<List<String>> getDatabaseNames() { |
| 292 try { | 299 try { |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 // WARNING: Do not edit - generated code. | 1126 // WARNING: Do not edit - generated code. |
| 1120 | 1127 |
| 1121 | 1128 |
| 1122 @DocsEditable | 1129 @DocsEditable |
| 1123 @DomName('IDBAny') | 1130 @DomName('IDBAny') |
| 1124 @deprecated // nonstandard | 1131 @deprecated // nonstandard |
| 1125 abstract class _IDBAny extends NativeFieldWrapperClass1 { | 1132 abstract class _IDBAny extends NativeFieldWrapperClass1 { |
| 1126 _IDBAny.internal(); | 1133 _IDBAny.internal(); |
| 1127 | 1134 |
| 1128 } | 1135 } |
| OLD | NEW |