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

Side by Side Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 27033009: Making all base class DOM types throw as well (to prevent a default constructor for DOM types that … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 @JSName('continue') 234 @JSName('continue')
235 @DomName('IDBCursor.continue') 235 @DomName('IDBCursor.continue')
236 void next([Object key]) { 236 void next([Object key]) {
237 if (key == null) { 237 if (key == null) {
238 JS('void', '#.continue()', this); 238 JS('void', '#.continue()', this);
239 } else { 239 } else {
240 JS('void', '#.continue(#)', this, key); 240 JS('void', '#.continue(#)', this, key);
241 } 241 }
242 } 242 }
243 243 // To suppress missing implicit constructor warnings.
244 factory Cursor._() { throw new UnsupportedError("Not supported"); }
245
244 @DomName('IDBCursor.direction') 246 @DomName('IDBCursor.direction')
245 @DocsEditable() 247 @DocsEditable()
246 final String direction; 248 final String direction;
247 249
248 @DomName('IDBCursor.key') 250 @DomName('IDBCursor.key')
249 @DocsEditable() 251 @DocsEditable()
250 @_annotation_Creates_IDBKey 252 @_annotation_Creates_IDBKey
251 @_annotation_Returns_IDBKey 253 @_annotation_Returns_IDBKey
252 final Object key; 254 final Object key;
253 255
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 } 547 }
546 548
547 /** 549 /**
548 * Checks to see if getDatabaseNames is supported by the current platform. 550 * Checks to see if getDatabaseNames is supported by the current platform.
549 */ 551 */
550 bool get supportsDatabaseNames { 552 bool get supportsDatabaseNames {
551 return supported && JS('bool', 553 return supported && JS('bool',
552 '!!(#.getDatabaseNames || #.webkitGetDatabaseNames)', this, this); 554 '!!(#.getDatabaseNames || #.webkitGetDatabaseNames)', this, this);
553 } 555 }
554 556
557 // To suppress missing implicit constructor warnings.
558 factory IdbFactory._() { throw new UnsupportedError("Not supported"); }
555 559
556 @DomName('IDBFactory.cmp') 560 @DomName('IDBFactory.cmp')
557 @DocsEditable() 561 @DocsEditable()
558 int cmp(Object first, Object second) native; 562 int cmp(Object first, Object second) native;
559 563
560 @JSName('deleteDatabase') 564 @JSName('deleteDatabase')
561 @DomName('IDBFactory.deleteDatabase') 565 @DomName('IDBFactory.deleteDatabase')
562 @DocsEditable() 566 @DocsEditable()
563 OpenDBRequest _deleteDatabase(String name) native; 567 OpenDBRequest _deleteDatabase(String name) native;
564 568
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 } 689 }
686 var request; 690 var request;
687 if (direction == null) { 691 if (direction == null) {
688 request = _openKeyCursor(key_OR_range); 692 request = _openKeyCursor(key_OR_range);
689 } else { 693 } else {
690 request = _openKeyCursor(key_OR_range, direction); 694 request = _openKeyCursor(key_OR_range, direction);
691 } 695 }
692 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 696 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
693 } 697 }
694 698
695 699 // To suppress missing implicit constructor warnings.
700 factory Index._() { throw new UnsupportedError("Not supported"); }
701
696 @DomName('IDBIndex.keyPath') 702 @DomName('IDBIndex.keyPath')
697 @DocsEditable() 703 @DocsEditable()
698 @annotation_Creates_SerializedScriptValue 704 @annotation_Creates_SerializedScriptValue
699 final dynamic keyPath; 705 final dynamic keyPath;
700 706
701 @DomName('IDBIndex.multiEntry') 707 @DomName('IDBIndex.multiEntry')
702 @DocsEditable() 708 @DocsEditable()
703 final bool multiEntry; 709 final bool multiEntry;
704 710
705 @DomName('IDBIndex.name') 711 @DomName('IDBIndex.name')
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 @DomName('IDBKeyRange.upperBound') 778 @DomName('IDBKeyRange.upperBound')
773 factory KeyRange.upperBound(/*Key*/ bound, [bool open = false]) => 779 factory KeyRange.upperBound(/*Key*/ bound, [bool open = false]) =>
774 _KeyRangeFactoryProvider.createKeyRange_upperBound(bound, open); 780 _KeyRangeFactoryProvider.createKeyRange_upperBound(bound, open);
775 781
776 @DomName('KeyRange.bound') 782 @DomName('KeyRange.bound')
777 factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper, 783 factory KeyRange.bound(/*Key*/ lower, /*Key*/ upper,
778 [bool lowerOpen = false, bool upperOpen = false]) => 784 [bool lowerOpen = false, bool upperOpen = false]) =>
779 _KeyRangeFactoryProvider.createKeyRange_bound( 785 _KeyRangeFactoryProvider.createKeyRange_bound(
780 lower, upper, lowerOpen, upperOpen); 786 lower, upper, lowerOpen, upperOpen);
781 787
788 // To suppress missing implicit constructor warnings.
789 factory KeyRange._() { throw new UnsupportedError("Not supported"); }
782 790
783 @DomName('IDBKeyRange.lower') 791 @DomName('IDBKeyRange.lower')
784 @DocsEditable() 792 @DocsEditable()
785 @annotation_Creates_SerializedScriptValue 793 @annotation_Creates_SerializedScriptValue
786 final Object lower; 794 final Object lower;
787 795
788 @DomName('IDBKeyRange.lowerOpen') 796 @DomName('IDBKeyRange.lowerOpen')
789 @DocsEditable() 797 @DocsEditable()
790 final bool lowerOpen; 798 final bool lowerOpen;
791 799
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 if (unique != null) { 955 if (unique != null) {
948 options['unique'] = unique; 956 options['unique'] = unique;
949 } 957 }
950 if (multiEntry != null) { 958 if (multiEntry != null) {
951 options['multiEntry'] = multiEntry; 959 options['multiEntry'] = multiEntry;
952 } 960 }
953 961
954 return _createIndex(name, keyPath, options); 962 return _createIndex(name, keyPath, options);
955 } 963 }
956 964
965 // To suppress missing implicit constructor warnings.
966 factory ObjectStore._() { throw new UnsupportedError("Not supported"); }
957 967
958 @DomName('IDBObjectStore.autoIncrement') 968 @DomName('IDBObjectStore.autoIncrement')
959 @DocsEditable() 969 @DocsEditable()
960 final bool autoIncrement; 970 final bool autoIncrement;
961 971
962 @DomName('IDBObjectStore.indexNames') 972 @DomName('IDBObjectStore.indexNames')
963 @DocsEditable() 973 @DocsEditable()
964 @Returns('DomStringList') 974 @Returns('DomStringList')
965 @Creates('DomStringList') 975 @Creates('DomStringList')
966 final List<String> indexNames; 976 final List<String> indexNames;
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 } 1346 }
1337 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1347 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1338 // for details. All rights reserved. Use of this source code is governed by a 1348 // for details. All rights reserved. Use of this source code is governed by a
1339 // BSD-style license that can be found in the LICENSE file. 1349 // BSD-style license that can be found in the LICENSE file.
1340 1350
1341 1351
1342 @DocsEditable() 1352 @DocsEditable()
1343 @DomName('IDBAny') 1353 @DomName('IDBAny')
1344 @deprecated // nonstandard 1354 @deprecated // nonstandard
1345 abstract class _IDBAny extends Interceptor native "IDBAny" { 1355 abstract class _IDBAny extends Interceptor native "IDBAny" {
1356 // To suppress missing implicit constructor warnings.
1357 factory _IDBAny._() { throw new UnsupportedError("Not supported"); }
1346 } 1358 }
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