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

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

Issue 23829002: Checkpoint in changes to match push (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: We were missing onReadyStateChange Created 7 years, 3 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
« no previous file with comments | « sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart ('k') | tests/html/html.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 String get name native "IDBIndex_name_Getter"; 496 String get name native "IDBIndex_name_Getter";
497 497
498 @DomName('IDBIndex.objectStore') 498 @DomName('IDBIndex.objectStore')
499 @DocsEditable() 499 @DocsEditable()
500 ObjectStore get objectStore native "IDBIndex_objectStore_Getter"; 500 ObjectStore get objectStore native "IDBIndex_objectStore_Getter";
501 501
502 @DomName('IDBIndex.unique') 502 @DomName('IDBIndex.unique')
503 @DocsEditable() 503 @DocsEditable()
504 bool get unique native "IDBIndex_unique_Getter"; 504 bool get unique native "IDBIndex_unique_Getter";
505 505
506 Request _count([key_OR_range]) { 506 @DomName('IDBIndex.count')
507 if ((key_OR_range is KeyRange || key_OR_range == null)) { 507 @DocsEditable()
508 return _count_1(key_OR_range); 508 Request _count(Object key) native "IDBIndex_count_Callback";
509 }
510 if (key_OR_range != null) {
511 return _count_2(key_OR_range);
512 }
513 throw new ArgumentError("Incorrect number or type of arguments");
514 }
515 509
516 Request _count_1(key_OR_range) native "IDBIndex__count_1_Callback"; 510 @DomName('IDBIndex.get')
511 @DocsEditable()
512 Request _get(Object key) native "IDBIndex_get_Callback";
517 513
518 Request _count_2(key_OR_range) native "IDBIndex__count_2_Callback"; 514 @DomName('IDBIndex.getKey')
515 @DocsEditable()
516 Request _getKey(Object key) native "IDBIndex_getKey_Callback";
519 517
520 Request _get(key) { 518 @DomName('IDBIndex.openCursor')
521 if ((key is KeyRange || key == null)) { 519 @DocsEditable()
522 return _get_1(key); 520 Request _openCursor(Object key, String direction) native "IDBIndex_openCursor_ Callback";
523 }
524 if (key != null) {
525 return _get_2(key);
526 }
527 throw new ArgumentError("Incorrect number or type of arguments");
528 }
529 521
530 Request _get_1(key) native "IDBIndex__get_1_Callback"; 522 @DomName('IDBIndex.openKeyCursor')
531 523 @DocsEditable()
532 Request _get_2(key) native "IDBIndex__get_2_Callback"; 524 Request _openKeyCursor(Object key, String direction) native "IDBIndex_openKeyC ursor_Callback";
533
534 Request _getKey(key) {
535 if ((key is KeyRange || key == null)) {
536 return _getKey_1(key);
537 }
538 if (key != null) {
539 return _getKey_2(key);
540 }
541 throw new ArgumentError("Incorrect number or type of arguments");
542 }
543
544 Request _getKey_1(key) native "IDBIndex__getKey_1_Callback";
545
546 Request _getKey_2(key) native "IDBIndex__getKey_2_Callback";
547
548 Request _openCursor([key_OR_range, String direction]) {
549 if ((direction is String || direction == null) && (key_OR_range is KeyRange || key_OR_range == null)) {
550 return _openCursor_1(key_OR_range, direction);
551 }
552 if ((direction is String || direction == null) && key_OR_range != null) {
553 return _openCursor_2(key_OR_range, direction);
554 }
555 throw new ArgumentError("Incorrect number or type of arguments");
556 }
557
558 Request _openCursor_1(key_OR_range, direction) native "IDBIndex__openCursor_1_ Callback";
559
560 Request _openCursor_2(key_OR_range, direction) native "IDBIndex__openCursor_2_ Callback";
561
562 Request _openKeyCursor([key_OR_range, String direction]) {
563 if ((direction is String || direction == null) && (key_OR_range is KeyRange || key_OR_range == null)) {
564 return _openKeyCursor_1(key_OR_range, direction);
565 }
566 if ((direction is String || direction == null) && key_OR_range != null) {
567 return _openKeyCursor_2(key_OR_range, direction);
568 }
569 throw new ArgumentError("Incorrect number or type of arguments");
570 }
571
572 Request _openKeyCursor_1(key_OR_range, direction) native "IDBIndex__openKeyCur sor_1_Callback";
573
574 Request _openKeyCursor_2(key_OR_range, direction) native "IDBIndex__openKeyCur sor_2_Callback";
575 525
576 } 526 }
577 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 527 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
578 // for details. All rights reserved. Use of this source code is governed by a 528 // for details. All rights reserved. Use of this source code is governed by a
579 // BSD-style license that can be found in the LICENSE file. 529 // BSD-style license that can be found in the LICENSE file.
580 530
581 531
582 @DomName('IDBKeyRange') 532 @DomName('IDBKeyRange')
583 @Unstable() 533 @Unstable()
584 class KeyRange extends NativeFieldWrapperClass1 { 534 class KeyRange extends NativeFieldWrapperClass1 {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 Transaction get transaction native "IDBObjectStore_transaction_Getter"; 750 Transaction get transaction native "IDBObjectStore_transaction_Getter";
801 751
802 @DomName('IDBObjectStore.add') 752 @DomName('IDBObjectStore.add')
803 @DocsEditable() 753 @DocsEditable()
804 Request _add(Object value, [Object key]) native "IDBObjectStore_add_Callback"; 754 Request _add(Object value, [Object key]) native "IDBObjectStore_add_Callback";
805 755
806 @DomName('IDBObjectStore.clear') 756 @DomName('IDBObjectStore.clear')
807 @DocsEditable() 757 @DocsEditable()
808 Request _clear() native "IDBObjectStore_clear_Callback"; 758 Request _clear() native "IDBObjectStore_clear_Callback";
809 759
810 Request _count([key_OR_range]) { 760 @DomName('IDBObjectStore.count')
811 if ((key_OR_range is KeyRange || key_OR_range == null)) { 761 @DocsEditable()
812 return _count_1(key_OR_range); 762 Request _count(Object key) native "IDBObjectStore_count_Callback";
813 }
814 if (key_OR_range != null) {
815 return _count_2(key_OR_range);
816 }
817 throw new ArgumentError("Incorrect number or type of arguments");
818 }
819
820 Request _count_1(key_OR_range) native "IDBObjectStore__count_1_Callback";
821
822 Request _count_2(key_OR_range) native "IDBObjectStore__count_2_Callback";
823 763
824 Index _createIndex(String name, keyPath, [Map options]) { 764 Index _createIndex(String name, keyPath, [Map options]) {
825 if ((options is Map || options == null) && (keyPath is List<String> || keyPa th == null) && (name is String || name == null)) { 765 if ((options is Map || options == null) && (keyPath is List<String> || keyPa th == null) && (name is String || name == null)) {
826 return _createIndex_1(name, keyPath, options); 766 return _createIndex_1(name, keyPath, options);
827 } 767 }
828 if ((options is Map || options == null) && (keyPath is String || keyPath == null) && (name is String || name == null)) { 768 if ((options is Map || options == null) && (keyPath is String || keyPath == null) && (name is String || name == null)) {
829 return _createIndex_2(name, keyPath, options); 769 return _createIndex_2(name, keyPath, options);
830 } 770 }
831 throw new ArgumentError("Incorrect number or type of arguments"); 771 throw new ArgumentError("Incorrect number or type of arguments");
832 } 772 }
833 773
834 Index _createIndex_1(name, keyPath, options) native "IDBObjectStore__createInd ex_1_Callback"; 774 Index _createIndex_1(name, keyPath, options) native "IDBObjectStore__createInd ex_1_Callback";
835 775
836 Index _createIndex_2(name, keyPath, options) native "IDBObjectStore__createInd ex_2_Callback"; 776 Index _createIndex_2(name, keyPath, options) native "IDBObjectStore__createInd ex_2_Callback";
837 777
838 Request _delete(key_OR_keyRange) { 778 @DomName('IDBObjectStore.delete')
839 if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) { 779 @DocsEditable()
840 return _delete_1(key_OR_keyRange); 780 Request _delete(Object key) native "IDBObjectStore_delete_Callback";
841 }
842 if (key_OR_keyRange != null) {
843 return _delete_2(key_OR_keyRange);
844 }
845 throw new ArgumentError("Incorrect number or type of arguments");
846 }
847
848 Request _delete_1(key_OR_keyRange) native "IDBObjectStore__delete_1_Callback";
849
850 Request _delete_2(key_OR_keyRange) native "IDBObjectStore__delete_2_Callback";
851 781
852 @DomName('IDBObjectStore.deleteIndex') 782 @DomName('IDBObjectStore.deleteIndex')
853 @DocsEditable() 783 @DocsEditable()
854 void deleteIndex(String name) native "IDBObjectStore_deleteIndex_Callback"; 784 void deleteIndex(String name) native "IDBObjectStore_deleteIndex_Callback";
855 785
856 Request _get(key) { 786 @DomName('IDBObjectStore.get')
857 if ((key is KeyRange || key == null)) { 787 @DocsEditable()
858 return _get_1(key); 788 Request _get(Object key) native "IDBObjectStore_get_Callback";
859 }
860 if (key != null) {
861 return _get_2(key);
862 }
863 throw new ArgumentError("Incorrect number or type of arguments");
864 }
865
866 Request _get_1(key) native "IDBObjectStore__get_1_Callback";
867
868 Request _get_2(key) native "IDBObjectStore__get_2_Callback";
869 789
870 @DomName('IDBObjectStore.index') 790 @DomName('IDBObjectStore.index')
871 @DocsEditable() 791 @DocsEditable()
872 Index index(String name) native "IDBObjectStore_index_Callback"; 792 Index index(String name) native "IDBObjectStore_index_Callback";
873 793
874 Request _openCursor([key_OR_range, String direction]) { 794 @DomName('IDBObjectStore.openCursor')
875 if ((direction is String || direction == null) && (key_OR_range is KeyRange || key_OR_range == null)) { 795 @DocsEditable()
876 return _openCursor_1(key_OR_range, direction); 796 Request _openCursor(Object key, [String direction]) native "IDBObjectStore_ope nCursor_Callback";
877 }
878 if ((direction is String || direction == null) && key_OR_range != null) {
879 return _openCursor_2(key_OR_range, direction);
880 }
881 throw new ArgumentError("Incorrect number or type of arguments");
882 }
883
884 Request _openCursor_1(key_OR_range, direction) native "IDBObjectStore__openCur sor_1_Callback";
885
886 Request _openCursor_2(key_OR_range, direction) native "IDBObjectStore__openCur sor_2_Callback";
887 797
888 @DomName('IDBObjectStore.put') 798 @DomName('IDBObjectStore.put')
889 @DocsEditable() 799 @DocsEditable()
890 Request _put(Object value, [Object key]) native "IDBObjectStore_put_Callback"; 800 Request _put(Object value, [Object key]) native "IDBObjectStore_put_Callback";
891 801
892 802
893 /** 803 /**
894 * Helper for iterating over cursors in a request. 804 * Helper for iterating over cursors in a request.
895 */ 805 */
896 static Stream<Cursor> _cursorStreamFromResult(Request request, 806 static Stream<Cursor> _cursorStreamFromResult(Request request,
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 1051
1142 // WARNING: Do not edit - generated code. 1052 // WARNING: Do not edit - generated code.
1143 1053
1144 1054
1145 @DocsEditable() 1055 @DocsEditable()
1146 @DomName('IDBAny') 1056 @DomName('IDBAny')
1147 @deprecated // nonstandard 1057 @deprecated // nonstandard
1148 abstract class _IDBAny extends NativeFieldWrapperClass1 { 1058 abstract class _IDBAny extends NativeFieldWrapperClass1 {
1149 1059
1150 } 1060 }
OLDNEW
« no previous file with comments | « sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart ('k') | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698