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

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

Issue 1237263005: Revert "- Update _blink library using dart:js instead of native keyword" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/svg/dartium/svg_dartium.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 'IDBIndex': () => Index, 115 'IDBIndex': () => Index,
116 'IDBKeyRange': () => KeyRange, 116 'IDBKeyRange': () => KeyRange,
117 'IDBObjectStore': () => ObjectStore, 117 'IDBObjectStore': () => ObjectStore,
118 'IDBOpenDBRequest': () => OpenDBRequest, 118 'IDBOpenDBRequest': () => OpenDBRequest,
119 'IDBRequest': () => Request, 119 'IDBRequest': () => Request,
120 'IDBTransaction': () => Transaction, 120 'IDBTransaction': () => Transaction,
121 'IDBVersionChangeEvent': () => VersionChangeEvent, 121 'IDBVersionChangeEvent': () => VersionChangeEvent,
122 122
123 }; 123 };
124 124
125 // FIXME: Can we make this private?
126 final indexed_dbBlinkFunctionMap = {
127 'IDBCursor': () => Cursor.internalCreateCursor,
128 'IDBCursorWithValue': () => CursorWithValue.internalCreateCursorWithValue,
129 'IDBDatabase': () => Database.internalCreateDatabase,
130 'IDBFactory': () => IdbFactory.internalCreateIdbFactory,
131 'IDBIndex': () => Index.internalCreateIndex,
132 'IDBKeyRange': () => KeyRange.internalCreateKeyRange,
133 'IDBObjectStore': () => ObjectStore.internalCreateObjectStore,
134 'IDBOpenDBRequest': () => OpenDBRequest.internalCreateOpenDBRequest,
135 'IDBRequest': () => Request.internalCreateRequest,
136 'IDBTransaction': () => Transaction.internalCreateTransaction,
137 'IDBVersionChangeEvent': () => VersionChangeEvent.internalCreateVersionChangeE vent,
138
139 };
140 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 125 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
141 // for details. All rights reserved. Use of this source code is governed by a 126 // for details. All rights reserved. Use of this source code is governed by a
142 // BSD-style license that can be found in the LICENSE file. 127 // BSD-style license that can be found in the LICENSE file.
143 128
144 129
145 @DomName('IDBCursor') 130 @DomName('IDBCursor')
146 @Unstable() 131 @Unstable()
147 class Cursor extends NativeFieldWrapperClass2 { 132 class Cursor extends NativeFieldWrapperClass2 {
148 @DomName('IDBCursor.delete') 133 @DomName('IDBCursor.delete')
149 Future delete() { 134 Future delete() {
150 try { 135 try {
151 return _completeRequest(_delete()); 136 return _completeRequest(_delete());
152 } catch (e, stacktrace) { 137 } catch (e, stacktrace) {
153 return new Future.error(e, stacktrace); 138 return new Future.error(e, stacktrace);
154 } 139 }
155 } 140 }
156 141
157 @DomName('IDBCursor.value') 142 @DomName('IDBCursor.value')
158 Future update(value) { 143 Future update(value) {
159 try { 144 try {
160 return _completeRequest(_update(value)); 145 return _completeRequest(_update(value));
161 } catch (e, stacktrace) { 146 } catch (e, stacktrace) {
162 return new Future.error(e, stacktrace); 147 return new Future.error(e, stacktrace);
163 } 148 }
164 } 149 }
165 150
166 // To suppress missing implicit constructor warnings. 151 // To suppress missing implicit constructor warnings.
167 factory Cursor._() { throw new UnsupportedError("Not supported"); } 152 factory Cursor._() { throw new UnsupportedError("Not supported"); }
168 153
169 static Cursor internalCreateCursor() {
170 return new Cursor._internalWrap();
171 }
172
173 JsObject blink_jsObject = null;
174
175 factory Cursor._internalWrap() {
176 return new Cursor._internal();
177 }
178
179 Cursor._internal() { }
180
181 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical( this, other);
182
183 @DomName('IDBCursor.direction') 154 @DomName('IDBCursor.direction')
184 @DocsEditable() 155 @DocsEditable()
185 String get direction => _blink.BlinkIDBCursor.instance.direction_Getter_(unwra p_jso(this)); 156 String get direction => _blink.BlinkIDBCursor.instance.direction_Getter_(unwra p_jso(this));
186 157
187 @DomName('IDBCursor.key') 158 @DomName('IDBCursor.key')
188 @DocsEditable() 159 @DocsEditable()
189 Object get key => _blink.BlinkIDBCursor.instance.key_Getter_(unwrap_jso(this)) ; 160 Object get key => _blink.BlinkIDBCursor.instance.key_Getter_(unwrap_jso(this)) ;
190 161
191 @DomName('IDBCursor.primaryKey') 162 @DomName('IDBCursor.primaryKey')
192 @DocsEditable() 163 @DocsEditable()
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // WARNING: Do not edit - generated code. 201 // WARNING: Do not edit - generated code.
231 202
232 203
233 @DocsEditable() 204 @DocsEditable()
234 @DomName('IDBCursorWithValue') 205 @DomName('IDBCursorWithValue')
235 @Unstable() 206 @Unstable()
236 class CursorWithValue extends Cursor { 207 class CursorWithValue extends Cursor {
237 // To suppress missing implicit constructor warnings. 208 // To suppress missing implicit constructor warnings.
238 factory CursorWithValue._() { throw new UnsupportedError("Not supported"); } 209 factory CursorWithValue._() { throw new UnsupportedError("Not supported"); }
239 210
240
241 static CursorWithValue internalCreateCursorWithValue() {
242 return new CursorWithValue._internalWrap();
243 }
244
245 factory CursorWithValue._internalWrap() {
246 return new CursorWithValue._internal();
247 }
248
249 CursorWithValue._internal() : super._internal();
250
251
252 @DomName('IDBCursorWithValue.value') 211 @DomName('IDBCursorWithValue.value')
253 @DocsEditable() 212 @DocsEditable()
254 Object get value => _blink.BlinkIDBCursorWithValue.instance.value_Getter_(unwr ap_jso(this)); 213 Object get value => _blink.BlinkIDBCursorWithValue.instance.value_Getter_(unwr ap_jso(this));
255 214
256 } 215 }
257 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 216 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
258 // for details. All rights reserved. Use of this source code is governed by a 217 // for details. All rights reserved. Use of this source code is governed by a
259 // BSD-style license that can be found in the LICENSE file. 218 // BSD-style license that can be found in the LICENSE file.
260 219
261 220
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 /** 284 /**
326 * Static factory designed to expose `versionchange` events to event 285 * Static factory designed to expose `versionchange` events to event
327 * handlers that are not necessarily instances of [Database]. 286 * handlers that are not necessarily instances of [Database].
328 * 287 *
329 * See [EventStreamProvider] for usage information. 288 * See [EventStreamProvider] for usage information.
330 */ 289 */
331 @DomName('IDBDatabase.versionchangeEvent') 290 @DomName('IDBDatabase.versionchangeEvent')
332 @DocsEditable() 291 @DocsEditable()
333 static const EventStreamProvider<VersionChangeEvent> versionChangeEvent = cons t EventStreamProvider<VersionChangeEvent>('versionchange'); 292 static const EventStreamProvider<VersionChangeEvent> versionChangeEvent = cons t EventStreamProvider<VersionChangeEvent>('versionchange');
334 293
335
336 static Database internalCreateDatabase() {
337 return new Database._internalWrap();
338 }
339
340 factory Database._internalWrap() {
341 return new Database._internal();
342 }
343
344 Database._internal() : super._internal();
345
346
347 @DomName('IDBDatabase.name') 294 @DomName('IDBDatabase.name')
348 @DocsEditable() 295 @DocsEditable()
349 String get name => _blink.BlinkIDBDatabase.instance.name_Getter_(unwrap_jso(th is)); 296 String get name => _blink.BlinkIDBDatabase.instance.name_Getter_(unwrap_jso(th is));
350 297
351 @DomName('IDBDatabase.objectStoreNames') 298 @DomName('IDBDatabase.objectStoreNames')
352 @DocsEditable() 299 @DocsEditable()
353 List<String> get objectStoreNames => _blink.BlinkIDBDatabase.instance.objectSt oreNames_Getter_(unwrap_jso(this)); 300 List<String> get objectStoreNames => _blink.BlinkIDBDatabase.instance.objectSt oreNames_Getter_(unwrap_jso(this));
354 301
355 @DomName('IDBDatabase.version') 302 @DomName('IDBDatabase.version')
356 @DocsEditable() 303 @DocsEditable()
357 Object get version => _blink.BlinkIDBDatabase.instance.version_Getter_(unwrap_ jso(this)); 304 Object get version => _blink.BlinkIDBDatabase.instance.version_Getter_(unwrap_ jso(this));
358 305
359 @DomName('IDBDatabase.close') 306 @DomName('IDBDatabase.close')
360 @DocsEditable() 307 @DocsEditable()
361 void close() => _blink.BlinkIDBDatabase.instance.close_Callback_0_(unwrap_jso( this)); 308 void close() => _blink.BlinkIDBDatabase.instance.close_Callback_0_(unwrap_jso( this));
362 309
363 ObjectStore _createObjectStore(String name, [Map options]) { 310 ObjectStore _createObjectStore(String name, [Map options]) {
364 if (options != null) { 311 if (options != null) {
365 return _blink.BlinkIDBDatabase.instance.createObjectStore_Callback_2_(unwr ap_jso(this), name, options != null ? new js.JsObject.jsify(options) : options); 312 return _blink.BlinkIDBDatabase.instance.createObjectStore_Callback_2_(unwr ap_jso(this), name, options);
366 } 313 }
367 return _blink.BlinkIDBDatabase.instance.createObjectStore_Callback_1_(unwrap _jso(this), name); 314 return _blink.BlinkIDBDatabase.instance.createObjectStore_Callback_1_(unwrap _jso(this), name);
368 } 315 }
369 316
370 @DomName('IDBDatabase.deleteObjectStore') 317 @DomName('IDBDatabase.deleteObjectStore')
371 @DocsEditable() 318 @DocsEditable()
372 void deleteObjectStore(String name) => _blink.BlinkIDBDatabase.instance.delete ObjectStore_Callback_1_(unwrap_jso(this), name); 319 void deleteObjectStore(String name) => _blink.BlinkIDBDatabase.instance.delete ObjectStore_Callback_1_(unwrap_jso(this), name);
373 320
374 Transaction transaction(storeName_OR_storeNames, [String mode]) { 321 Transaction transaction(storeName_OR_storeNames, [String mode]) {
375 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) & & mode == null) { 322 if ((storeName_OR_storeNames is String || storeName_OR_storeNames == null) & & mode == null) {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 /** 466 /**
520 * Checks to see if getDatabaseNames is supported by the current platform. 467 * Checks to see if getDatabaseNames is supported by the current platform.
521 */ 468 */
522 bool get supportsDatabaseNames { 469 bool get supportsDatabaseNames {
523 return true; 470 return true;
524 } 471 }
525 472
526 // To suppress missing implicit constructor warnings. 473 // To suppress missing implicit constructor warnings.
527 factory IdbFactory._() { throw new UnsupportedError("Not supported"); } 474 factory IdbFactory._() { throw new UnsupportedError("Not supported"); }
528 475
529 static IdbFactory internalCreateIdbFactory() {
530 return new IdbFactory._internalWrap();
531 }
532
533 JsObject blink_jsObject = null;
534
535 factory IdbFactory._internalWrap() {
536 return new IdbFactory._internal();
537 }
538
539 IdbFactory._internal() { }
540
541 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical( this, other);
542
543 @DomName('IDBFactory.cmp') 476 @DomName('IDBFactory.cmp')
544 @DocsEditable() 477 @DocsEditable()
545 int cmp(Object first, Object second) => _blink.BlinkIDBFactory.instance.cmp_Ca llback_2_(unwrap_jso(this), first, second); 478 int cmp(Object first, Object second) => _blink.BlinkIDBFactory.instance.cmp_Ca llback_2_(unwrap_jso(this), first, second);
546 479
547 @DomName('IDBFactory.deleteDatabase') 480 @DomName('IDBFactory.deleteDatabase')
548 @DocsEditable() 481 @DocsEditable()
549 OpenDBRequest _deleteDatabase(String name) => _blink.BlinkIDBFactory.instance. deleteDatabase_Callback_1_(unwrap_jso(this), name); 482 OpenDBRequest _deleteDatabase(String name) => _blink.BlinkIDBFactory.instance. deleteDatabase_Callback_1_(unwrap_jso(this), name);
550 483
551 OpenDBRequest _open(String name, [int version]) { 484 OpenDBRequest _open(String name, [int version]) {
552 if (version != null) { 485 if (version != null) {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 request = _openKeyCursor(key_OR_range, "next"); 604 request = _openKeyCursor(key_OR_range, "next");
672 } else { 605 } else {
673 request = _openKeyCursor(key_OR_range, direction); 606 request = _openKeyCursor(key_OR_range, direction);
674 } 607 }
675 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 608 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
676 } 609 }
677 610
678 // To suppress missing implicit constructor warnings. 611 // To suppress missing implicit constructor warnings.
679 factory Index._() { throw new UnsupportedError("Not supported"); } 612 factory Index._() { throw new UnsupportedError("Not supported"); }
680 613
681 static Index internalCreateIndex() {
682 return new Index._internalWrap();
683 }
684
685 JsObject blink_jsObject = null;
686
687 factory Index._internalWrap() {
688 return new Index._internal();
689 }
690
691 Index._internal() { }
692
693 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical( this, other);
694
695 @DomName('IDBIndex.keyPath') 614 @DomName('IDBIndex.keyPath')
696 @DocsEditable() 615 @DocsEditable()
697 Object get keyPath => _blink.BlinkIDBIndex.instance.keyPath_Getter_(unwrap_jso (this)); 616 Object get keyPath => _blink.BlinkIDBIndex.instance.keyPath_Getter_(unwrap_jso (this));
698 617
699 @DomName('IDBIndex.multiEntry') 618 @DomName('IDBIndex.multiEntry')
700 @DocsEditable() 619 @DocsEditable()
701 bool get multiEntry => _blink.BlinkIDBIndex.instance.multiEntry_Getter_(unwrap _jso(this)); 620 bool get multiEntry => _blink.BlinkIDBIndex.instance.multiEntry_Getter_(unwrap _jso(this));
702 621
703 @DomName('IDBIndex.name') 622 @DomName('IDBIndex.name')
704 @DocsEditable() 623 @DocsEditable()
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 680
762 @DomName('KeyRange.bound') 681 @DomName('KeyRange.bound')
763 factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper, 682 factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper,
764 [bool lowerOpen = false, bool upperOpen = false]) => 683 [bool lowerOpen = false, bool upperOpen = false]) =>
765 _KeyRangeFactoryProvider.createKeyRange_bound( 684 _KeyRangeFactoryProvider.createKeyRange_bound(
766 lower, upper, lowerOpen, upperOpen); 685 lower, upper, lowerOpen, upperOpen);
767 686
768 // To suppress missing implicit constructor warnings. 687 // To suppress missing implicit constructor warnings.
769 factory KeyRange._() { throw new UnsupportedError("Not supported"); } 688 factory KeyRange._() { throw new UnsupportedError("Not supported"); }
770 689
771 static KeyRange internalCreateKeyRange() {
772 return new KeyRange._internalWrap();
773 }
774
775 JsObject blink_jsObject = null;
776
777 factory KeyRange._internalWrap() {
778 return new KeyRange._internal();
779 }
780
781 KeyRange._internal() { }
782
783 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical( this, other);
784
785 @DomName('IDBKeyRange.lower') 690 @DomName('IDBKeyRange.lower')
786 @DocsEditable() 691 @DocsEditable()
787 Object get lower => _blink.BlinkIDBKeyRange.instance.lower_Getter_(unwrap_jso( this)); 692 Object get lower => _blink.BlinkIDBKeyRange.instance.lower_Getter_(unwrap_jso( this));
788 693
789 @DomName('IDBKeyRange.lowerOpen') 694 @DomName('IDBKeyRange.lowerOpen')
790 @DocsEditable() 695 @DocsEditable()
791 bool get lowerOpen => _blink.BlinkIDBKeyRange.instance.lowerOpen_Getter_(unwra p_jso(this)); 696 bool get lowerOpen => _blink.BlinkIDBKeyRange.instance.lowerOpen_Getter_(unwra p_jso(this));
792 697
793 @DomName('IDBKeyRange.upper') 698 @DomName('IDBKeyRange.upper')
794 @DocsEditable() 699 @DocsEditable()
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 if (multiEntry != null) { 864 if (multiEntry != null) {
960 options['multiEntry'] = multiEntry; 865 options['multiEntry'] = multiEntry;
961 } 866 }
962 867
963 return _createIndex(name, keyPath, options); 868 return _createIndex(name, keyPath, options);
964 } 869 }
965 870
966 // To suppress missing implicit constructor warnings. 871 // To suppress missing implicit constructor warnings.
967 factory ObjectStore._() { throw new UnsupportedError("Not supported"); } 872 factory ObjectStore._() { throw new UnsupportedError("Not supported"); }
968 873
969 static ObjectStore internalCreateObjectStore() {
970 return new ObjectStore._internalWrap();
971 }
972
973 JsObject blink_jsObject = null;
974
975 factory ObjectStore._internalWrap() {
976 return new ObjectStore._internal();
977 }
978
979 ObjectStore._internal() { }
980
981 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical( this, other);
982
983 @DomName('IDBObjectStore.autoIncrement') 874 @DomName('IDBObjectStore.autoIncrement')
984 @DocsEditable() 875 @DocsEditable()
985 bool get autoIncrement => _blink.BlinkIDBObjectStore.instance.autoIncrement_Ge tter_(unwrap_jso(this)); 876 bool get autoIncrement => _blink.BlinkIDBObjectStore.instance.autoIncrement_Ge tter_(unwrap_jso(this));
986 877
987 @DomName('IDBObjectStore.indexNames') 878 @DomName('IDBObjectStore.indexNames')
988 @DocsEditable() 879 @DocsEditable()
989 List<String> get indexNames => _blink.BlinkIDBObjectStore.instance.indexNames_ Getter_(unwrap_jso(this)); 880 List<String> get indexNames => _blink.BlinkIDBObjectStore.instance.indexNames_ Getter_(unwrap_jso(this));
990 881
991 @DomName('IDBObjectStore.keyPath') 882 @DomName('IDBObjectStore.keyPath')
992 @DocsEditable() 883 @DocsEditable()
(...skipping 20 matching lines...) Expand all
1013 904
1014 @DomName('IDBObjectStore.count') 905 @DomName('IDBObjectStore.count')
1015 @DocsEditable() 906 @DocsEditable()
1016 Request _count(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.cou nt_Callback_1_(unwrap_jso(this), key)); 907 Request _count(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.cou nt_Callback_1_(unwrap_jso(this), key));
1017 908
1018 Index _createIndex(String name, keyPath, [Map options]) { 909 Index _createIndex(String name, keyPath, [Map options]) {
1019 if ((keyPath is String || keyPath == null) && (name is String || name == nul l) && options == null) { 910 if ((keyPath is String || keyPath == null) && (name is String || name == nul l) && options == null) {
1020 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_(unwrap_ jso(this), name, unwrap_jso(keyPath)); 911 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_(unwrap_ jso(this), name, unwrap_jso(keyPath));
1021 } 912 }
1022 if ((options is Map || options == null) && (keyPath is String || keyPath == null) && (name is String || name == null)) { 913 if ((options is Map || options == null) && (keyPath is String || keyPath == null) && (name is String || name == null)) {
1023 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_3_(unwrap_ jso(this), name, unwrap_jso(keyPath), options != null ? new js.JsObject.jsify(op tions) : options); 914 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_3_(unwrap_ jso(this), name, unwrap_jso(keyPath), options);
1024 } 915 }
1025 if ((keyPath is List<String> || keyPath == null) && (name is String || name == null) && options == null) { 916 if ((keyPath is List<String> || keyPath == null) && (name is String || name == null) && options == null) {
1026 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_(unwrap_ jso(this), name, unwrap_jso(keyPath)); 917 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_2_(unwrap_ jso(this), name, unwrap_jso(keyPath));
1027 } 918 }
1028 if ((options is Map || options == null) && (keyPath is List<String> || keyPa th == null) && (name is String || name == null)) { 919 if ((options is Map || options == null) && (keyPath is List<String> || keyPa th == null) && (name is String || name == null)) {
1029 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_3_(unwrap_ jso(this), name, unwrap_jso(keyPath), options != null ? new js.JsObject.jsify(op tions) : options); 920 return _blink.BlinkIDBObjectStore.instance.createIndex_Callback_3_(unwrap_ jso(this), name, unwrap_jso(keyPath), options);
1030 } 921 }
1031 throw new ArgumentError("Incorrect number or type of arguments"); 922 throw new ArgumentError("Incorrect number or type of arguments");
1032 } 923 }
1033 924
1034 @DomName('IDBObjectStore.delete') 925 @DomName('IDBObjectStore.delete')
1035 @DocsEditable() 926 @DocsEditable()
1036 Request _delete(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.de lete_Callback_1_(unwrap_jso(this), key)); 927 Request _delete(Object key) => wrap_jso(_blink.BlinkIDBObjectStore.instance.de lete_Callback_1_(unwrap_jso(this), key));
1037 928
1038 @DomName('IDBObjectStore.deleteIndex') 929 @DomName('IDBObjectStore.deleteIndex')
1039 @DocsEditable() 930 @DocsEditable()
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 /** 1014 /**
1124 * Static factory designed to expose `upgradeneeded` events to event 1015 * Static factory designed to expose `upgradeneeded` events to event
1125 * handlers that are not necessarily instances of [OpenDBRequest]. 1016 * handlers that are not necessarily instances of [OpenDBRequest].
1126 * 1017 *
1127 * See [EventStreamProvider] for usage information. 1018 * See [EventStreamProvider] for usage information.
1128 */ 1019 */
1129 @DomName('IDBOpenDBRequest.upgradeneededEvent') 1020 @DomName('IDBOpenDBRequest.upgradeneededEvent')
1130 @DocsEditable() 1021 @DocsEditable()
1131 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons t EventStreamProvider<VersionChangeEvent>('upgradeneeded'); 1022 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons t EventStreamProvider<VersionChangeEvent>('upgradeneeded');
1132 1023
1133
1134 static OpenDBRequest internalCreateOpenDBRequest() {
1135 return new OpenDBRequest._internalWrap();
1136 }
1137
1138 factory OpenDBRequest._internalWrap() {
1139 return new OpenDBRequest._internal();
1140 }
1141
1142 OpenDBRequest._internal() : super._internal();
1143
1144
1145 /// Stream of `blocked` events handled by this [OpenDBRequest]. 1024 /// Stream of `blocked` events handled by this [OpenDBRequest].
1146 @DomName('IDBOpenDBRequest.onblocked') 1025 @DomName('IDBOpenDBRequest.onblocked')
1147 @DocsEditable() 1026 @DocsEditable()
1148 Stream<Event> get onBlocked => blockedEvent.forTarget(this); 1027 Stream<Event> get onBlocked => blockedEvent.forTarget(this);
1149 1028
1150 /// Stream of `upgradeneeded` events handled by this [OpenDBRequest]. 1029 /// Stream of `upgradeneeded` events handled by this [OpenDBRequest].
1151 @DomName('IDBOpenDBRequest.onupgradeneeded') 1030 @DomName('IDBOpenDBRequest.onupgradeneeded')
1152 @DocsEditable() 1031 @DocsEditable()
1153 Stream<VersionChangeEvent> get onUpgradeNeeded => upgradeNeededEvent.forTarget (this); 1032 Stream<VersionChangeEvent> get onUpgradeNeeded => upgradeNeededEvent.forTarget (this);
1154 1033
(...skipping 25 matching lines...) Expand all
1180 /** 1059 /**
1181 * Static factory designed to expose `success` events to event 1060 * Static factory designed to expose `success` events to event
1182 * handlers that are not necessarily instances of [Request]. 1061 * handlers that are not necessarily instances of [Request].
1183 * 1062 *
1184 * See [EventStreamProvider] for usage information. 1063 * See [EventStreamProvider] for usage information.
1185 */ 1064 */
1186 @DomName('IDBRequest.successEvent') 1065 @DomName('IDBRequest.successEvent')
1187 @DocsEditable() 1066 @DocsEditable()
1188 static const EventStreamProvider<Event> successEvent = const EventStreamProvid er<Event>('success'); 1067 static const EventStreamProvider<Event> successEvent = const EventStreamProvid er<Event>('success');
1189 1068
1190
1191 static Request internalCreateRequest() {
1192 return new Request._internalWrap();
1193 }
1194
1195 factory Request._internalWrap() {
1196 return new Request._internal();
1197 }
1198
1199 Request._internal() : super._internal();
1200
1201
1202 @DomName('IDBRequest.error') 1069 @DomName('IDBRequest.error')
1203 @DocsEditable() 1070 @DocsEditable()
1204 DomError get error => wrap_jso(_blink.BlinkIDBRequest.instance.error_Getter_(u nwrap_jso(this))); 1071 DomError get error => wrap_jso(_blink.BlinkIDBRequest.instance.error_Getter_(u nwrap_jso(this)));
1205 1072
1206 @DomName('IDBRequest.readyState') 1073 @DomName('IDBRequest.readyState')
1207 @DocsEditable() 1074 @DocsEditable()
1208 String get readyState => _blink.BlinkIDBRequest.instance.readyState_Getter_(un wrap_jso(this)); 1075 String get readyState => _blink.BlinkIDBRequest.instance.readyState_Getter_(un wrap_jso(this));
1209 1076
1210 @DomName('IDBRequest.result') 1077 @DomName('IDBRequest.result')
1211 @DocsEditable() 1078 @DocsEditable()
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 /** 1160 /**
1294 * Static factory designed to expose `error` events to event 1161 * Static factory designed to expose `error` events to event
1295 * handlers that are not necessarily instances of [Transaction]. 1162 * handlers that are not necessarily instances of [Transaction].
1296 * 1163 *
1297 * See [EventStreamProvider] for usage information. 1164 * See [EventStreamProvider] for usage information.
1298 */ 1165 */
1299 @DomName('IDBTransaction.errorEvent') 1166 @DomName('IDBTransaction.errorEvent')
1300 @DocsEditable() 1167 @DocsEditable()
1301 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider <Event>('error'); 1168 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider <Event>('error');
1302 1169
1303
1304 static Transaction internalCreateTransaction() {
1305 return new Transaction._internalWrap();
1306 }
1307
1308 factory Transaction._internalWrap() {
1309 return new Transaction._internal();
1310 }
1311
1312 Transaction._internal() : super._internal();
1313
1314
1315 @DomName('IDBTransaction.db') 1170 @DomName('IDBTransaction.db')
1316 @DocsEditable() 1171 @DocsEditable()
1317 Database get db => wrap_jso(_blink.BlinkIDBTransaction.instance.db_Getter_(unw rap_jso(this))); 1172 Database get db => wrap_jso(_blink.BlinkIDBTransaction.instance.db_Getter_(unw rap_jso(this)));
1318 1173
1319 @DomName('IDBTransaction.error') 1174 @DomName('IDBTransaction.error')
1320 @DocsEditable() 1175 @DocsEditable()
1321 DomError get error => wrap_jso(_blink.BlinkIDBTransaction.instance.error_Gette r_(unwrap_jso(this))); 1176 DomError get error => wrap_jso(_blink.BlinkIDBTransaction.instance.error_Gette r_(unwrap_jso(this)));
1322 1177
1323 @DomName('IDBTransaction.mode') 1178 @DomName('IDBTransaction.mode')
1324 @DocsEditable() 1179 @DocsEditable()
(...skipping 30 matching lines...) Expand all
1355 // WARNING: Do not edit - generated code. 1210 // WARNING: Do not edit - generated code.
1356 1211
1357 1212
1358 @DocsEditable() 1213 @DocsEditable()
1359 @DomName('IDBVersionChangeEvent') 1214 @DomName('IDBVersionChangeEvent')
1360 @Unstable() 1215 @Unstable()
1361 class VersionChangeEvent extends Event { 1216 class VersionChangeEvent extends Event {
1362 // To suppress missing implicit constructor warnings. 1217 // To suppress missing implicit constructor warnings.
1363 factory VersionChangeEvent._() { throw new UnsupportedError("Not supported"); } 1218 factory VersionChangeEvent._() { throw new UnsupportedError("Not supported"); }
1364 1219
1365
1366 static VersionChangeEvent internalCreateVersionChangeEvent() {
1367 return new VersionChangeEvent._internalWrap();
1368 }
1369
1370 factory VersionChangeEvent._internalWrap() {
1371 return new VersionChangeEvent._internal();
1372 }
1373
1374 VersionChangeEvent._internal() : super._internal();
1375
1376
1377 @DomName('IDBVersionChangeEvent.dataLoss') 1220 @DomName('IDBVersionChangeEvent.dataLoss')
1378 @DocsEditable() 1221 @DocsEditable()
1379 @Experimental() // untriaged 1222 @Experimental() // untriaged
1380 String get dataLoss => _blink.BlinkIDBVersionChangeEvent.instance.dataLoss_Get ter_(unwrap_jso(this)); 1223 String get dataLoss => _blink.BlinkIDBVersionChangeEvent.instance.dataLoss_Get ter_(unwrap_jso(this));
1381 1224
1382 @DomName('IDBVersionChangeEvent.dataLossMessage') 1225 @DomName('IDBVersionChangeEvent.dataLossMessage')
1383 @DocsEditable() 1226 @DocsEditable()
1384 @Experimental() // untriaged 1227 @Experimental() // untriaged
1385 String get dataLossMessage => _blink.BlinkIDBVersionChangeEvent.instance.dataL ossMessage_Getter_(unwrap_jso(this)); 1228 String get dataLossMessage => _blink.BlinkIDBVersionChangeEvent.instance.dataL ossMessage_Getter_(unwrap_jso(this));
1386 1229
1387 @DomName('IDBVersionChangeEvent.newVersion') 1230 @DomName('IDBVersionChangeEvent.newVersion')
1388 @DocsEditable() 1231 @DocsEditable()
1389 int get newVersion => _blink.BlinkIDBVersionChangeEvent.instance.newVersion_Ge tter_(unwrap_jso(this)); 1232 int get newVersion => _blink.BlinkIDBVersionChangeEvent.instance.newVersion_Ge tter_(unwrap_jso(this));
1390 1233
1391 @DomName('IDBVersionChangeEvent.oldVersion') 1234 @DomName('IDBVersionChangeEvent.oldVersion')
1392 @DocsEditable() 1235 @DocsEditable()
1393 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.instance.oldVersion_Ge tter_(unwrap_jso(this)); 1236 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.instance.oldVersion_Ge tter_(unwrap_jso(this));
1394 1237
1395 } 1238 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/svg/dartium/svg_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698