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

Side by Side Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 Request _count(Object key) native; 767 Request _count(Object key) native;
768 768
769 @JSName('get') 769 @JSName('get')
770 @DomName('IDBIndex.get') 770 @DomName('IDBIndex.get')
771 @DocsEditable() 771 @DocsEditable()
772 @Returns('Request') 772 @Returns('Request')
773 @Creates('Request') 773 @Creates('Request')
774 @annotation_Creates_SerializedScriptValue 774 @annotation_Creates_SerializedScriptValue
775 Request _get(Object key) native; 775 Request _get(Object key) native;
776 776
777 @DomName('IDBIndex.getAll')
778 @DocsEditable()
779 @Experimental() // untriaged
780 Request getAll(Object range, [int maxCount]) native;
781
782 @DomName('IDBIndex.getAllKeys')
783 @DocsEditable()
784 @Experimental() // untriaged
785 Request getAllKeys(Object range, [int maxCount]) native;
786
787 @JSName('getKey') 777 @JSName('getKey')
788 @DomName('IDBIndex.getKey') 778 @DomName('IDBIndex.getKey')
789 @DocsEditable() 779 @DocsEditable()
790 @Returns('Request') 780 @Returns('Request')
791 @Creates('Request') 781 @Creates('Request')
792 @annotation_Creates_SerializedScriptValue 782 @annotation_Creates_SerializedScriptValue
793 @Creates('ObjectStore') 783 @Creates('ObjectStore')
794 Request _getKey(Object key) native; 784 Request _getKey(Object key) native;
795 785
796 @JSName('openCursor') 786 @JSName('openCursor')
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 @DocsEditable() 1065 @DocsEditable()
1076 Request _clear() native; 1066 Request _clear() native;
1077 1067
1078 @JSName('count') 1068 @JSName('count')
1079 @DomName('IDBObjectStore.count') 1069 @DomName('IDBObjectStore.count')
1080 @DocsEditable() 1070 @DocsEditable()
1081 Request _count(Object key) native; 1071 Request _count(Object key) native;
1082 1072
1083 @DomName('IDBObjectStore.createIndex') 1073 @DomName('IDBObjectStore.createIndex')
1084 @DocsEditable() 1074 @DocsEditable()
1085 Index _createIndex(String name, Object keyPath, [Map options]) { 1075 Index _createIndex(String name, keyPath, [Map options]) {
1086 if (options != null) { 1076 if ((keyPath is String || keyPath == null) && options == null) {
1077 return _createIndex_1(name, keyPath);
1078 }
1079 if (options != null && (keyPath is String || keyPath == null)) {
1087 var options_1 = convertDartToNative_Dictionary(options); 1080 var options_1 = convertDartToNative_Dictionary(options);
1088 return _createIndex_1(name, keyPath, options_1); 1081 return _createIndex_2(name, keyPath, options_1);
1089 } 1082 }
1090 return _createIndex_2(name, keyPath); 1083 if ((keyPath is List<String> || keyPath == null) && options == null) {
1084 List keyPath_1 = convertDartToNative_StringArray(keyPath);
1085 return _createIndex_3(name, keyPath_1);
1086 }
1087 if (options != null && (keyPath is List<String> || keyPath == null)) {
1088 List keyPath_1 = convertDartToNative_StringArray(keyPath);
1089 var options_2 = convertDartToNative_Dictionary(options);
1090 return _createIndex_4(name, keyPath_1, options_2);
1091 }
1092 throw new ArgumentError("Incorrect number or type of arguments");
1091 } 1093 }
1092 @JSName('createIndex') 1094 @JSName('createIndex')
1093 @DomName('IDBObjectStore.createIndex') 1095 @DomName('IDBObjectStore.createIndex')
1094 @DocsEditable() 1096 @DocsEditable()
1095 Index _createIndex_1(name, keyPath, options) native; 1097 Index _createIndex_1(name, String keyPath) native;
1096 @JSName('createIndex') 1098 @JSName('createIndex')
1097 @DomName('IDBObjectStore.createIndex') 1099 @DomName('IDBObjectStore.createIndex')
1098 @DocsEditable() 1100 @DocsEditable()
1099 Index _createIndex_2(name, keyPath) native; 1101 Index _createIndex_2(name, String keyPath, options) native;
1102 @JSName('createIndex')
1103 @DomName('IDBObjectStore.createIndex')
1104 @DocsEditable()
1105 Index _createIndex_3(name, List keyPath) native;
1106 @JSName('createIndex')
1107 @DomName('IDBObjectStore.createIndex')
1108 @DocsEditable()
1109 Index _createIndex_4(name, List keyPath, options) native;
1100 1110
1101 @JSName('delete') 1111 @JSName('delete')
1102 @DomName('IDBObjectStore.delete') 1112 @DomName('IDBObjectStore.delete')
1103 @DocsEditable() 1113 @DocsEditable()
1104 Request _delete(Object key) native; 1114 Request _delete(Object key) native;
1105 1115
1106 @DomName('IDBObjectStore.deleteIndex') 1116 @DomName('IDBObjectStore.deleteIndex')
1107 @DocsEditable() 1117 @DocsEditable()
1108 void deleteIndex(String name) native; 1118 void deleteIndex(String name) native;
1109 1119
1110 @JSName('get') 1120 @JSName('get')
1111 @DomName('IDBObjectStore.get') 1121 @DomName('IDBObjectStore.get')
1112 @DocsEditable() 1122 @DocsEditable()
1113 @Returns('Request') 1123 @Returns('Request')
1114 @Creates('Request') 1124 @Creates('Request')
1115 @annotation_Creates_SerializedScriptValue 1125 @annotation_Creates_SerializedScriptValue
1116 Request _get(Object key) native; 1126 Request _get(Object key) native;
1117 1127
1118 @DomName('IDBObjectStore.getAll')
1119 @DocsEditable()
1120 @Experimental() // untriaged
1121 Request getAll(Object range, [int maxCount]) native;
1122
1123 @DomName('IDBObjectStore.getAllKeys')
1124 @DocsEditable()
1125 @Experimental() // untriaged
1126 Request getAllKeys(Object range, [int maxCount]) native;
1127
1128 @DomName('IDBObjectStore.index') 1128 @DomName('IDBObjectStore.index')
1129 @DocsEditable() 1129 @DocsEditable()
1130 Index index(String name) native; 1130 Index index(String name) native;
1131 1131
1132 @JSName('openCursor') 1132 @JSName('openCursor')
1133 @DomName('IDBObjectStore.openCursor') 1133 @DomName('IDBObjectStore.openCursor')
1134 @DocsEditable() 1134 @DocsEditable()
1135 @Returns('Request') 1135 @Returns('Request')
1136 @Creates('Request') 1136 @Creates('Request')
1137 @Creates('Cursor') 1137 @Creates('Cursor')
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 final Database db; 1387 final Database db;
1388 1388
1389 @DomName('IDBTransaction.error') 1389 @DomName('IDBTransaction.error')
1390 @DocsEditable() 1390 @DocsEditable()
1391 final DomError error; 1391 final DomError error;
1392 1392
1393 @DomName('IDBTransaction.mode') 1393 @DomName('IDBTransaction.mode')
1394 @DocsEditable() 1394 @DocsEditable()
1395 final String mode; 1395 final String mode;
1396 1396
1397 @DomName('IDBTransaction.objectStoreNames')
1398 @DocsEditable()
1399 @Experimental() // untriaged
1400 @Returns('DomStringList')
1401 @Creates('DomStringList')
1402 final List<String> objectStoreNames;
1403
1404 @DomName('IDBTransaction.abort') 1397 @DomName('IDBTransaction.abort')
1405 @DocsEditable() 1398 @DocsEditable()
1406 void abort() native; 1399 void abort() native;
1407 1400
1408 @DomName('IDBTransaction.objectStore') 1401 @DomName('IDBTransaction.objectStore')
1409 @DocsEditable() 1402 @DocsEditable()
1410 ObjectStore objectStore(String name) native; 1403 ObjectStore objectStore(String name) native;
1411 1404
1412 /// Stream of `abort` events handled by this [Transaction]. 1405 /// Stream of `abort` events handled by this [Transaction].
1413 @DomName('IDBTransaction.onabort') 1406 @DomName('IDBTransaction.onabort')
(...skipping 17 matching lines...) Expand all
1431 1424
1432 1425
1433 @DocsEditable() 1426 @DocsEditable()
1434 @DomName('IDBVersionChangeEvent') 1427 @DomName('IDBVersionChangeEvent')
1435 @Unstable() 1428 @Unstable()
1436 @Native("IDBVersionChangeEvent") 1429 @Native("IDBVersionChangeEvent")
1437 class VersionChangeEvent extends Event { 1430 class VersionChangeEvent extends Event {
1438 // To suppress missing implicit constructor warnings. 1431 // To suppress missing implicit constructor warnings.
1439 factory VersionChangeEvent._() { throw new UnsupportedError("Not supported"); } 1432 factory VersionChangeEvent._() { throw new UnsupportedError("Not supported"); }
1440 1433
1441 @DomName('IDBVersionChangeEvent.IDBVersionChangeEvent')
1442 @DocsEditable()
1443 factory VersionChangeEvent(String type, [Map eventInitDict]) {
1444 if (eventInitDict != null) {
1445 var eventInitDict_1 = convertDartToNative_Dictionary(eventInitDict);
1446 return VersionChangeEvent._create_1(type, eventInitDict_1);
1447 }
1448 return VersionChangeEvent._create_2(type);
1449 }
1450 static VersionChangeEvent _create_1(type, eventInitDict) => JS('VersionChangeE vent', 'new IDBVersionChangeEvent(#,#)', type, eventInitDict);
1451 static VersionChangeEvent _create_2(type) => JS('VersionChangeEvent', 'new IDB VersionChangeEvent(#)', type);
1452
1453 @DomName('IDBVersionChangeEvent.dataLoss') 1434 @DomName('IDBVersionChangeEvent.dataLoss')
1454 @DocsEditable() 1435 @DocsEditable()
1455 @Experimental() // untriaged 1436 @Experimental() // untriaged
1456 final String dataLoss; 1437 final String dataLoss;
1457 1438
1458 @DomName('IDBVersionChangeEvent.dataLossMessage') 1439 @DomName('IDBVersionChangeEvent.dataLossMessage')
1459 @DocsEditable() 1440 @DocsEditable()
1460 @Experimental() // untriaged 1441 @Experimental() // untriaged
1461 final String dataLossMessage; 1442 final String dataLossMessage;
1462 1443
1463 @DomName('IDBVersionChangeEvent.newVersion') 1444 @DomName('IDBVersionChangeEvent.newVersion')
1464 @DocsEditable() 1445 @DocsEditable()
1465 @Creates('int|String|Null') 1446 @Creates('int|String|Null')
1466 @Returns('int|String|Null') 1447 @Returns('int|String|Null')
1467 final int newVersion; 1448 final int newVersion;
1468 1449
1469 @DomName('IDBVersionChangeEvent.oldVersion') 1450 @DomName('IDBVersionChangeEvent.oldVersion')
1470 @DocsEditable() 1451 @DocsEditable()
1471 @Creates('int|String|Null') 1452 @Creates('int|String|Null')
1472 @Returns('int|String|Null') 1453 @Returns('int|String|Null')
1473 final int oldVersion; 1454 final int oldVersion;
1474 } 1455 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698