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

Side by Side Diff: sdk/lib/indexed_db/dartium/indexed_db_dartium.dart

Issue 1763753002: Revert "Changes to tests and status file for the 45 roll w/ regenderated sdk/libs" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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:
View unified diff | Download patch
OLDNEW
1 /** 1 /**
2 * A client-side key-value store with support for indexes. 2 * A client-side key-value store with support for indexes.
3 * 3 *
4 * Many browsers support IndexedDB—a web standard for 4 * Many browsers support IndexedDB—a web standard for
5 * an indexed database. 5 * an indexed database.
6 * By storing data on the client in an IndexedDB, 6 * By storing data on the client in an IndexedDB,
7 * a web app gets some advantages, such as faster performance and persistence. 7 * a web app gets some advantages, such as faster performance and persistence.
8 * To find out which browsers support IndexedDB, 8 * To find out which browsers support IndexedDB,
9 * refer to [Can I Use?](http://caniuse.com/#feat=indexeddb) 9 * refer to [Can I Use?](http://caniuse.com/#feat=indexeddb)
10 * 10 *
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 bool get unique => _blink.BlinkIDBIndex.instance.unique_Getter_(unwrap_jso(thi s)); 697 bool get unique => _blink.BlinkIDBIndex.instance.unique_Getter_(unwrap_jso(thi s));
698 698
699 @DomName('IDBIndex.count') 699 @DomName('IDBIndex.count')
700 @DocsEditable() 700 @DocsEditable()
701 Request _count(Object key) => wrap_jso(_blink.BlinkIDBIndex.instance.count_Cal lback_1_(unwrap_jso(this), key)); 701 Request _count(Object key) => wrap_jso(_blink.BlinkIDBIndex.instance.count_Cal lback_1_(unwrap_jso(this), key));
702 702
703 @DomName('IDBIndex.get') 703 @DomName('IDBIndex.get')
704 @DocsEditable() 704 @DocsEditable()
705 Request _get(Object key) => wrap_jso(_blink.BlinkIDBIndex.instance.get_Callbac k_1_(unwrap_jso(this), key)); 705 Request _get(Object key) => wrap_jso(_blink.BlinkIDBIndex.instance.get_Callbac k_1_(unwrap_jso(this), key));
706 706
707 Request getAll(Object range, [int maxCount]) {
708 if (maxCount != null) {
709 return wrap_jso(_blink.BlinkIDBIndex.instance.getAll_Callback_2_(unwrap_js o(this), range, maxCount));
710 }
711 return wrap_jso(_blink.BlinkIDBIndex.instance.getAll_Callback_1_(unwrap_jso( this), range));
712 }
713
714 Request getAllKeys(Object range, [int maxCount]) {
715 if (maxCount != null) {
716 return wrap_jso(_blink.BlinkIDBIndex.instance.getAllKeys_Callback_2_(unwra p_jso(this), range, maxCount));
717 }
718 return wrap_jso(_blink.BlinkIDBIndex.instance.getAllKeys_Callback_1_(unwrap_ jso(this), range));
719 }
720
721 @DomName('IDBIndex.getKey') 707 @DomName('IDBIndex.getKey')
722 @DocsEditable() 708 @DocsEditable()
723 Request _getKey(Object key) => wrap_jso(_blink.BlinkIDBIndex.instance.getKey_C allback_1_(unwrap_jso(this), key)); 709 Request _getKey(Object key) => wrap_jso(_blink.BlinkIDBIndex.instance.getKey_C allback_1_(unwrap_jso(this), key));
724 710
725 Request _openCursor(Object range, [String direction]) { 711 Request _openCursor(Object range, [String direction]) {
726 if (direction != null) { 712 if (direction != null) {
727 return wrap_jso(_blink.BlinkIDBIndex.instance.openCursor_Callback_2_(unwra p_jso(this), range, direction)); 713 return wrap_jso(_blink.BlinkIDBIndex.instance.openCursor_Callback_2_(unwra p_jso(this), range, direction));
728 } 714 }
729 return wrap_jso(_blink.BlinkIDBIndex.instance.openCursor_Callback_1_(unwrap_ jso(this), range)); 715 return wrap_jso(_blink.BlinkIDBIndex.instance.openCursor_Callback_1_(unwrap_ jso(this), range));
730 } 716 }
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 } 994 }
1009 995
1010 @DomName('IDBObjectStore.clear') 996 @DomName('IDBObjectStore.clear')
1011 @DocsEditable() 997 @DocsEditable()
1012 Request _clear() => wrap_jso(_blink.BlinkIDBObjectStore.instance.clear_Callbac k_0_(unwrap_jso(this))); 998 Request _clear() => wrap_jso(_blink.BlinkIDBObjectStore.instance.clear_Callbac k_0_(unwrap_jso(this)));
1013 999
1014 @DomName('IDBObjectStore.count') 1000 @DomName('IDBObjectStore.count')
1015 @DocsEditable() 1001 @DocsEditable()
1016 Request _count(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.cou nt_Callback_1_(unwrap_jso(this), key)); 1002 Request _count(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.cou nt_Callback_1_(unwrap_jso(this), key));
1017 1003
1018 Index _createIndex(String name, Object keyPath, [Map options]) { 1004 Index _createIndex(String name, keyPath, [Map options]) {
1019 if (options != null) { 1005 if ((keyPath is String || keyPath == null) && (name is String || name == nul l) && options == null) {
1020 return wrap_jso(_blink.BlinkIDBObjectStore.instance.createIndex_Callback_3 _(unwrap_jso(this), name, keyPath, convertDartToNative_Dictionary(options))); 1006 return wrap_jso(_blink.BlinkIDBObjectStore.instance.createIndex_Callback_2 _(unwrap_jso(this), name, unwrap_jso(keyPath)));
1021 } 1007 }
1022 return wrap_jso(_blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_( unwrap_jso(this), name, keyPath)); 1008 if ((options is Map || options == null) && (keyPath is String || keyPath == null) && (name is String || name == null)) {
1009 return wrap_jso(_blink.BlinkIDBObjectStore.instance.createIndex_Callback_3 _(unwrap_jso(this), name, unwrap_jso(keyPath), convertDartToNative_Dictionary(op tions)));
1010 }
1011 if ((keyPath is List<String> || keyPath == null) && (name is String || name == null) && options == null) {
1012 return wrap_jso(_blink.BlinkIDBObjectStore.instance.createIndex_Callback_2 _(unwrap_jso(this), name, unwrap_jso(keyPath)));
1013 }
1014 if ((options is Map || options == null) && (keyPath is List<String> || keyPa th == null) && (name is String || name == null)) {
1015 return wrap_jso(_blink.BlinkIDBObjectStore.instance.createIndex_Callback_3 _(unwrap_jso(this), name, unwrap_jso(keyPath), convertDartToNative_Dictionary(op tions)));
1016 }
1017 throw new ArgumentError("Incorrect number or type of arguments");
1023 } 1018 }
1024 1019
1025 @DomName('IDBObjectStore.delete') 1020 @DomName('IDBObjectStore.delete')
1026 @DocsEditable() 1021 @DocsEditable()
1027 Request _delete(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.de lete_Callback_1_(unwrap_jso(this), key)); 1022 Request _delete(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.de lete_Callback_1_(unwrap_jso(this), key));
1028 1023
1029 @DomName('IDBObjectStore.deleteIndex') 1024 @DomName('IDBObjectStore.deleteIndex')
1030 @DocsEditable() 1025 @DocsEditable()
1031 void deleteIndex(String name) => _blink.BlinkIDBObjectStore.instance.deleteInd ex_Callback_1_(unwrap_jso(this), name); 1026 void deleteIndex(String name) => _blink.BlinkIDBObjectStore.instance.deleteInd ex_Callback_1_(unwrap_jso(this), name);
1032 1027
1033 @DomName('IDBObjectStore.get') 1028 @DomName('IDBObjectStore.get')
1034 @DocsEditable() 1029 @DocsEditable()
1035 Request _get(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.get_C allback_1_(unwrap_jso(this), key)); 1030 Request _get(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.get_C allback_1_(unwrap_jso(this), key));
1036 1031
1037 Request getAll(Object range, [int maxCount]) {
1038 if (maxCount != null) {
1039 return wrap_jso(_blink.BlinkIDBObjectStore.instance.getAll_Callback_2_(unw rap_jso(this), range, maxCount));
1040 }
1041 return wrap_jso(_blink.BlinkIDBObjectStore.instance.getAll_Callback_1_(unwra p_jso(this), range));
1042 }
1043
1044 Request getAllKeys(Object range, [int maxCount]) {
1045 if (maxCount != null) {
1046 return wrap_jso(_blink.BlinkIDBObjectStore.instance.getAllKeys_Callback_2_ (unwrap_jso(this), range, maxCount));
1047 }
1048 return wrap_jso(_blink.BlinkIDBObjectStore.instance.getAllKeys_Callback_1_(u nwrap_jso(this), range));
1049 }
1050
1051 @DomName('IDBObjectStore.index') 1032 @DomName('IDBObjectStore.index')
1052 @DocsEditable() 1033 @DocsEditable()
1053 Index index(String name) => wrap_jso(_blink.BlinkIDBObjectStore.instance.index _Callback_1_(unwrap_jso(this), name)); 1034 Index index(String name) => wrap_jso(_blink.BlinkIDBObjectStore.instance.index _Callback_1_(unwrap_jso(this), name));
1054 1035
1055 Request _openCursor(Object range, [String direction]) { 1036 Request _openCursor(Object range, [String direction]) {
1056 if (direction != null) { 1037 if (direction != null) {
1057 return wrap_jso(_blink.BlinkIDBObjectStore.instance.openCursor_Callback_2_ (unwrap_jso(this), range, direction)); 1038 return wrap_jso(_blink.BlinkIDBObjectStore.instance.openCursor_Callback_2_ (unwrap_jso(this), range, direction));
1058 } 1039 }
1059 return wrap_jso(_blink.BlinkIDBObjectStore.instance.openCursor_Callback_1_(u nwrap_jso(this), range)); 1040 return wrap_jso(_blink.BlinkIDBObjectStore.instance.openCursor_Callback_1_(u nwrap_jso(this), range));
1060 } 1041 }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 Database get db => wrap_jso(_blink.BlinkIDBTransaction.instance.db_Getter_(unw rap_jso(this))); 1303 Database get db => wrap_jso(_blink.BlinkIDBTransaction.instance.db_Getter_(unw rap_jso(this)));
1323 1304
1324 @DomName('IDBTransaction.error') 1305 @DomName('IDBTransaction.error')
1325 @DocsEditable() 1306 @DocsEditable()
1326 DomError get error => wrap_jso(_blink.BlinkIDBTransaction.instance.error_Gette r_(unwrap_jso(this))); 1307 DomError get error => wrap_jso(_blink.BlinkIDBTransaction.instance.error_Gette r_(unwrap_jso(this)));
1327 1308
1328 @DomName('IDBTransaction.mode') 1309 @DomName('IDBTransaction.mode')
1329 @DocsEditable() 1310 @DocsEditable()
1330 String get mode => _blink.BlinkIDBTransaction.instance.mode_Getter_(unwrap_jso (this)); 1311 String get mode => _blink.BlinkIDBTransaction.instance.mode_Getter_(unwrap_jso (this));
1331 1312
1332 @DomName('IDBTransaction.objectStoreNames')
1333 @DocsEditable()
1334 @Experimental() // untriaged
1335 List<String> get objectStoreNames => wrap_jso(_blink.BlinkIDBTransaction.insta nce.objectStoreNames_Getter_(unwrap_jso(this)));
1336
1337 @DomName('IDBTransaction.abort') 1313 @DomName('IDBTransaction.abort')
1338 @DocsEditable() 1314 @DocsEditable()
1339 void abort() => _blink.BlinkIDBTransaction.instance.abort_Callback_0_(unwrap_j so(this)); 1315 void abort() => _blink.BlinkIDBTransaction.instance.abort_Callback_0_(unwrap_j so(this));
1340 1316
1341 @DomName('IDBTransaction.objectStore') 1317 @DomName('IDBTransaction.objectStore')
1342 @DocsEditable() 1318 @DocsEditable()
1343 ObjectStore objectStore(String name) => wrap_jso(_blink.BlinkIDBTransaction.in stance.objectStore_Callback_1_(unwrap_jso(this), name)); 1319 ObjectStore objectStore(String name) => wrap_jso(_blink.BlinkIDBTransaction.in stance.objectStore_Callback_1_(unwrap_jso(this), name));
1344 1320
1345 /// Stream of `abort` events handled by this [Transaction]. 1321 /// Stream of `abort` events handled by this [Transaction].
1346 @DomName('IDBTransaction.onabort') 1322 @DomName('IDBTransaction.onabort')
(...skipping 18 matching lines...) Expand all
1365 // WARNING: Do not edit - generated code. 1341 // WARNING: Do not edit - generated code.
1366 1342
1367 1343
1368 @DocsEditable() 1344 @DocsEditable()
1369 @DomName('IDBVersionChangeEvent') 1345 @DomName('IDBVersionChangeEvent')
1370 @Unstable() 1346 @Unstable()
1371 class VersionChangeEvent extends Event { 1347 class VersionChangeEvent extends Event {
1372 // To suppress missing implicit constructor warnings. 1348 // To suppress missing implicit constructor warnings.
1373 factory VersionChangeEvent._() { throw new UnsupportedError("Not supported"); } 1349 factory VersionChangeEvent._() { throw new UnsupportedError("Not supported"); }
1374 1350
1375 @DomName('IDBVersionChangeEvent.IDBVersionChangeEvent')
1376 @DocsEditable()
1377 factory VersionChangeEvent(String type, [Map eventInitDict]) {
1378 if (eventInitDict != null) {
1379 var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
1380 return wrap_jso(_blink.BlinkIDBVersionChangeEvent.instance.constructorCall back_2_(type, eventInitDict_1));
1381 }
1382 return wrap_jso(_blink.BlinkIDBVersionChangeEvent.instance.constructorCallba ck_1_(type));
1383 }
1384
1385 1351
1386 @Deprecated("Internal Use Only") 1352 @Deprecated("Internal Use Only")
1387 static VersionChangeEvent internalCreateVersionChangeEvent() { 1353 static VersionChangeEvent internalCreateVersionChangeEvent() {
1388 return new VersionChangeEvent._internalWrap(); 1354 return new VersionChangeEvent._internalWrap();
1389 } 1355 }
1390 1356
1391 external factory VersionChangeEvent._internalWrap(); 1357 external factory VersionChangeEvent._internalWrap();
1392 1358
1393 @Deprecated("Internal Use Only") 1359 @Deprecated("Internal Use Only")
1394 VersionChangeEvent.internal_() : super.internal_(); 1360 VersionChangeEvent.internal_() : super.internal_();
(...skipping 11 matching lines...) Expand all
1406 1372
1407 @DomName('IDBVersionChangeEvent.newVersion') 1373 @DomName('IDBVersionChangeEvent.newVersion')
1408 @DocsEditable() 1374 @DocsEditable()
1409 int get newVersion => _blink.BlinkIDBVersionChangeEvent.instance.newVersion_Ge tter_(unwrap_jso(this)); 1375 int get newVersion => _blink.BlinkIDBVersionChangeEvent.instance.newVersion_Ge tter_(unwrap_jso(this));
1410 1376
1411 @DomName('IDBVersionChangeEvent.oldVersion') 1377 @DomName('IDBVersionChangeEvent.oldVersion')
1412 @DocsEditable() 1378 @DocsEditable()
1413 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.instance.oldVersion_Ge tter_(unwrap_jso(this)); 1379 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.instance.oldVersion_Ge tter_(unwrap_jso(this));
1414 1380
1415 } 1381 }
OLDNEW
« no previous file with comments | « sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart ('k') | sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698