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

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

Issue 15074006: Generating annotations from DOM triage list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 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 21 matching lines...) Expand all
32 /*IDBKey*/ lower, /*IDBKey*/ upper, 32 /*IDBKey*/ lower, /*IDBKey*/ upper,
33 [bool lowerOpen = false, bool upperOpen = false]) => 33 [bool lowerOpen = false, bool upperOpen = false]) =>
34 KeyRange.bound_(lower, upper, lowerOpen, upperOpen); 34 KeyRange.bound_(lower, upper, lowerOpen, upperOpen);
35 } 35 }
36 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 36 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
37 // for details. All rights reserved. Use of this source code is governed by a 37 // for details. All rights reserved. Use of this source code is governed by a
38 // BSD-style license that can be found in the LICENSE file. 38 // BSD-style license that can be found in the LICENSE file.
39 39
40 40
41 @DomName('IDBCursor') 41 @DomName('IDBCursor')
42 @Unstable
42 class Cursor extends NativeFieldWrapperClass1 { 43 class Cursor extends NativeFieldWrapperClass1 {
43 @DomName('IDBCursor.delete') 44 @DomName('IDBCursor.delete')
44 Future delete() { 45 Future delete() {
45 try { 46 try {
46 return _completeRequest($dom_delete()); 47 return _completeRequest($dom_delete());
47 } catch (e, stacktrace) { 48 } catch (e, stacktrace) {
48 return new Future.error(e, stacktrace); 49 return new Future.error(e, stacktrace);
49 } 50 }
50 } 51 }
51 52
(...skipping 27 matching lines...) Expand all
79 @DomName('IDBCursor.advance') 80 @DomName('IDBCursor.advance')
80 @DocsEditable 81 @DocsEditable
81 void advance(int count) native "IDBCursor_advance_Callback"; 82 void advance(int count) native "IDBCursor_advance_Callback";
82 83
83 @DomName('IDBCursor.delete') 84 @DomName('IDBCursor.delete')
84 @DocsEditable 85 @DocsEditable
85 Request $dom_delete() native "IDBCursor_delete_Callback"; 86 Request $dom_delete() native "IDBCursor_delete_Callback";
86 87
87 @DomName('IDBCursor.next') 88 @DomName('IDBCursor.next')
88 @DocsEditable 89 @DocsEditable
90 @Experimental // non-standard
89 void next([Object key]) native "IDBCursor_next_Callback"; 91 void next([Object key]) native "IDBCursor_next_Callback";
90 92
91 @DomName('IDBCursor.update') 93 @DomName('IDBCursor.update')
92 @DocsEditable 94 @DocsEditable
93 Request $dom_update(Object value) native "IDBCursor_update_Callback"; 95 Request $dom_update(Object value) native "IDBCursor_update_Callback";
94 96
95 } 97 }
96 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 98 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
97 // for details. All rights reserved. Use of this source code is governed by a 99 // for details. All rights reserved. Use of this source code is governed by a
98 // BSD-style license that can be found in the LICENSE file. 100 // BSD-style license that can be found in the LICENSE file.
99 101
100 // WARNING: Do not edit - generated code. 102 // WARNING: Do not edit - generated code.
101 103
102 104
103 @DocsEditable 105 @DocsEditable
104 @DomName('IDBCursorWithValue') 106 @DomName('IDBCursorWithValue')
107 @Unstable
105 class CursorWithValue extends Cursor { 108 class CursorWithValue extends Cursor {
106 CursorWithValue.internal() : super.internal(); 109 CursorWithValue.internal() : super.internal();
107 110
108 @DomName('IDBCursorWithValue.value') 111 @DomName('IDBCursorWithValue.value')
109 @DocsEditable 112 @DocsEditable
110 Object get value native "IDBCursorWithValue_value_Getter"; 113 Object get value native "IDBCursorWithValue_value_Getter";
111 114
112 } 115 }
113 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 116 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
114 // for details. All rights reserved. Use of this source code is governed by a 117 // for details. All rights reserved. Use of this source code is governed by a
115 // BSD-style license that can be found in the LICENSE file. 118 // BSD-style license that can be found in the LICENSE file.
116 119
117 120
118 @DocsEditable 121 @DocsEditable
119 @DomName('IDBDatabase') 122 @DomName('IDBDatabase')
120 @SupportedBrowser(SupportedBrowser.CHROME) 123 @SupportedBrowser(SupportedBrowser.CHROME)
121 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') 124 @SupportedBrowser(SupportedBrowser.FIREFOX, '15')
122 @SupportedBrowser(SupportedBrowser.IE, '10') 125 @SupportedBrowser(SupportedBrowser.IE, '10')
123 @Experimental 126 @Experimental
127 @Unstable
124 class Database extends EventTarget { 128 class Database extends EventTarget {
125 @DomName('IDBDatabase.createObjectStore') 129 @DomName('IDBDatabase.createObjectStore')
126 @DocsEditable 130 @DocsEditable
127 ObjectStore createObjectStore(String name, 131 ObjectStore createObjectStore(String name,
128 {String keyPath, bool autoIncrement}) { 132 {String keyPath, bool autoIncrement}) {
129 var options = {}; 133 var options = {};
130 if (keyPath != null) { 134 if (keyPath != null) {
131 options['keyPath'] = keyPath; 135 options['keyPath'] = keyPath;
132 } 136 }
133 if (autoIncrement != null) { 137 if (autoIncrement != null) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 226 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
223 // for details. All rights reserved. Use of this source code is governed by a 227 // for details. All rights reserved. Use of this source code is governed by a
224 // BSD-style license that can be found in the LICENSE file. 228 // BSD-style license that can be found in the LICENSE file.
225 229
226 230
227 @DomName('IDBFactory') 231 @DomName('IDBFactory')
228 @SupportedBrowser(SupportedBrowser.CHROME) 232 @SupportedBrowser(SupportedBrowser.CHROME)
229 @SupportedBrowser(SupportedBrowser.FIREFOX, '15') 233 @SupportedBrowser(SupportedBrowser.FIREFOX, '15')
230 @SupportedBrowser(SupportedBrowser.IE, '10') 234 @SupportedBrowser(SupportedBrowser.IE, '10')
231 @Experimental 235 @Experimental
236 @Unstable
232 class IdbFactory extends NativeFieldWrapperClass1 { 237 class IdbFactory extends NativeFieldWrapperClass1 {
233 /** 238 /**
234 * Checks to see if Indexed DB is supported on the current platform. 239 * Checks to see if Indexed DB is supported on the current platform.
235 */ 240 */
236 static bool get supported { 241 static bool get supported {
237 return true; 242 return true;
238 } 243 }
239 244
240 @DomName('IDBFactory.open') 245 @DomName('IDBFactory.open')
241 Future<Database> open(String name, 246 Future<Database> open(String name,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 completer.completeError(e); 351 completer.completeError(e);
347 }); 352 });
348 return completer.future; 353 return completer.future;
349 } 354 }
350 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 355 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
351 // for details. All rights reserved. Use of this source code is governed by a 356 // for details. All rights reserved. Use of this source code is governed by a
352 // BSD-style license that can be found in the LICENSE file. 357 // BSD-style license that can be found in the LICENSE file.
353 358
354 359
355 @DomName('IDBIndex') 360 @DomName('IDBIndex')
361 @Unstable
356 class Index extends NativeFieldWrapperClass1 { 362 class Index extends NativeFieldWrapperClass1 {
357 @DomName('IDBIndex.count') 363 @DomName('IDBIndex.count')
358 Future<int> count([key_OR_range]) { 364 Future<int> count([key_OR_range]) {
359 try { 365 try {
360 var request; 366 var request;
361 if (key_OR_range != null) { 367 if (key_OR_range != null) {
362 request = $dom_count(key_OR_range); 368 request = $dom_count(key_OR_range);
363 } else { 369 } else {
364 request = $dom_count(); 370 request = $dom_count();
365 } 371 }
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 543
538 Request _openKeyCursor_2(key_OR_range, direction) native "IDBIndex__openKeyCur sor_2_Callback"; 544 Request _openKeyCursor_2(key_OR_range, direction) native "IDBIndex__openKeyCur sor_2_Callback";
539 545
540 } 546 }
541 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 547 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
542 // for details. All rights reserved. Use of this source code is governed by a 548 // for details. All rights reserved. Use of this source code is governed by a
543 // BSD-style license that can be found in the LICENSE file. 549 // BSD-style license that can be found in the LICENSE file.
544 550
545 551
546 @DomName('IDBKeyRange') 552 @DomName('IDBKeyRange')
553 @Unstable
547 class KeyRange extends NativeFieldWrapperClass1 { 554 class KeyRange extends NativeFieldWrapperClass1 {
548 @DomName('IDBKeyRange.only') 555 @DomName('IDBKeyRange.only')
549 factory KeyRange.only(/*Key*/ value) => 556 factory KeyRange.only(/*Key*/ value) =>
550 _KeyRangeFactoryProvider.createKeyRange_only(value); 557 _KeyRangeFactoryProvider.createKeyRange_only(value);
551 558
552 @DomName('IDBKeyRange.lowerBound') 559 @DomName('IDBKeyRange.lowerBound')
553 factory KeyRange.lowerBound(/*Key*/ bound, [bool open = false]) => 560 factory KeyRange.lowerBound(/*Key*/ bound, [bool open = false]) =>
554 _KeyRangeFactoryProvider.createKeyRange_lowerBound(bound, open); 561 _KeyRangeFactoryProvider.createKeyRange_lowerBound(bound, open);
555 562
556 @DomName('IDBKeyRange.upperBound') 563 @DomName('IDBKeyRange.upperBound')
(...skipping 19 matching lines...) Expand all
576 @DomName('IDBKeyRange.upper') 583 @DomName('IDBKeyRange.upper')
577 @DocsEditable 584 @DocsEditable
578 Object get upper native "IDBKeyRange_upper_Getter"; 585 Object get upper native "IDBKeyRange_upper_Getter";
579 586
580 @DomName('IDBKeyRange.upperOpen') 587 @DomName('IDBKeyRange.upperOpen')
581 @DocsEditable 588 @DocsEditable
582 bool get upperOpen native "IDBKeyRange_upperOpen_Getter"; 589 bool get upperOpen native "IDBKeyRange_upperOpen_Getter";
583 590
584 @DomName('IDBKeyRange.bound_') 591 @DomName('IDBKeyRange.bound_')
585 @DocsEditable 592 @DocsEditable
593 @Experimental // non-standard
586 static KeyRange bound_(Object lower, Object upper, [bool lowerOpen, bool upper Open]) native "IDBKeyRange_bound__Callback"; 594 static KeyRange bound_(Object lower, Object upper, [bool lowerOpen, bool upper Open]) native "IDBKeyRange_bound__Callback";
587 595
588 @DomName('IDBKeyRange.lowerBound_') 596 @DomName('IDBKeyRange.lowerBound_')
589 @DocsEditable 597 @DocsEditable
598 @Experimental // non-standard
590 static KeyRange lowerBound_(Object bound, [bool open]) native "IDBKeyRange_low erBound__Callback"; 599 static KeyRange lowerBound_(Object bound, [bool open]) native "IDBKeyRange_low erBound__Callback";
591 600
592 @DomName('IDBKeyRange.only_') 601 @DomName('IDBKeyRange.only_')
593 @DocsEditable 602 @DocsEditable
603 @Experimental // non-standard
594 static KeyRange only_(Object value) native "IDBKeyRange_only__Callback"; 604 static KeyRange only_(Object value) native "IDBKeyRange_only__Callback";
595 605
596 @DomName('IDBKeyRange.upperBound_') 606 @DomName('IDBKeyRange.upperBound_')
597 @DocsEditable 607 @DocsEditable
608 @Experimental // non-standard
598 static KeyRange upperBound_(Object bound, [bool open]) native "IDBKeyRange_upp erBound__Callback"; 609 static KeyRange upperBound_(Object bound, [bool open]) native "IDBKeyRange_upp erBound__Callback";
599 610
600 } 611 }
601 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 612 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
602 // for details. All rights reserved. Use of this source code is governed by a 613 // for details. All rights reserved. Use of this source code is governed by a
603 // BSD-style license that can be found in the LICENSE file. 614 // BSD-style license that can be found in the LICENSE file.
604 615
605 616
606 @DomName('IDBObjectStore') 617 @DomName('IDBObjectStore')
618 @Unstable
607 class ObjectStore extends NativeFieldWrapperClass1 { 619 class ObjectStore extends NativeFieldWrapperClass1 {
608 620
609 @DomName('IDBObjectStore.add') 621 @DomName('IDBObjectStore.add')
610 Future add(value, [key]) { 622 Future add(value, [key]) {
611 try { 623 try {
612 var request; 624 var request;
613 if (key != null) { 625 if (key != null) {
614 request = $dom_add(value, key); 626 request = $dom_add(value, key);
615 } else { 627 } else {
616 request = $dom_add(value); 628 request = $dom_add(value);
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 } 893 }
882 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 894 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
883 // for details. All rights reserved. Use of this source code is governed by a 895 // for details. All rights reserved. Use of this source code is governed by a
884 // BSD-style license that can be found in the LICENSE file. 896 // BSD-style license that can be found in the LICENSE file.
885 897
886 // WARNING: Do not edit - generated code. 898 // WARNING: Do not edit - generated code.
887 899
888 900
889 @DocsEditable 901 @DocsEditable
890 @DomName('IDBOpenDBRequest') 902 @DomName('IDBOpenDBRequest')
903 @Unstable
891 class OpenDBRequest extends Request implements EventTarget { 904 class OpenDBRequest extends Request implements EventTarget {
892 OpenDBRequest.internal() : super.internal(); 905 OpenDBRequest.internal() : super.internal();
893 906
894 @DomName('IDBOpenDBRequest.blockedEvent') 907 @DomName('IDBOpenDBRequest.blockedEvent')
895 @DocsEditable 908 @DocsEditable
896 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid er<Event>('blocked'); 909 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid er<Event>('blocked');
897 910
898 @DomName('IDBOpenDBRequest.upgradeneededEvent') 911 @DomName('IDBOpenDBRequest.upgradeneededEvent')
899 @DocsEditable 912 @DocsEditable
900 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons t EventStreamProvider<VersionChangeEvent>('upgradeneeded'); 913 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons t EventStreamProvider<VersionChangeEvent>('upgradeneeded');
901 914
902 @DomName('IDBOpenDBRequest.onblocked') 915 @DomName('IDBOpenDBRequest.onblocked')
903 @DocsEditable 916 @DocsEditable
904 Stream<Event> get onBlocked => blockedEvent.forTarget(this); 917 Stream<Event> get onBlocked => blockedEvent.forTarget(this);
905 918
906 @DomName('IDBOpenDBRequest.onupgradeneeded') 919 @DomName('IDBOpenDBRequest.onupgradeneeded')
907 @DocsEditable 920 @DocsEditable
908 Stream<VersionChangeEvent> get onUpgradeNeeded => upgradeNeededEvent.forTarget (this); 921 Stream<VersionChangeEvent> get onUpgradeNeeded => upgradeNeededEvent.forTarget (this);
909 922
910 } 923 }
911 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 924 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
912 // for details. All rights reserved. Use of this source code is governed by a 925 // for details. All rights reserved. Use of this source code is governed by a
913 // BSD-style license that can be found in the LICENSE file. 926 // BSD-style license that can be found in the LICENSE file.
914 927
915 // WARNING: Do not edit - generated code. 928 // WARNING: Do not edit - generated code.
916 929
917 930
918 @DocsEditable 931 @DocsEditable
919 @DomName('IDBRequest') 932 @DomName('IDBRequest')
933 @Unstable
920 class Request extends EventTarget { 934 class Request extends EventTarget {
921 Request.internal() : super.internal(); 935 Request.internal() : super.internal();
922 936
923 @DomName('IDBRequest.errorEvent') 937 @DomName('IDBRequest.errorEvent')
924 @DocsEditable 938 @DocsEditable
925 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider <Event>('error'); 939 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider <Event>('error');
926 940
927 @DomName('IDBRequest.successEvent') 941 @DomName('IDBRequest.successEvent')
928 @DocsEditable 942 @DocsEditable
929 static const EventStreamProvider<Event> successEvent = const EventStreamProvid er<Event>('success'); 943 static const EventStreamProvider<Event> successEvent = const EventStreamProvid er<Event>('success');
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 @DocsEditable 989 @DocsEditable
976 Stream<Event> get onSuccess => successEvent.forTarget(this); 990 Stream<Event> get onSuccess => successEvent.forTarget(this);
977 991
978 } 992 }
979 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 993 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
980 // for details. All rights reserved. Use of this source code is governed by a 994 // for details. All rights reserved. Use of this source code is governed by a
981 // BSD-style license that can be found in the LICENSE file. 995 // BSD-style license that can be found in the LICENSE file.
982 996
983 997
984 @DomName('IDBTransaction') 998 @DomName('IDBTransaction')
999 @Unstable
985 class Transaction extends EventTarget { 1000 class Transaction extends EventTarget {
986 1001
987 /** 1002 /**
988 * Provides a Future which will be completed once the transaction has 1003 * Provides a Future which will be completed once the transaction has
989 * completed. 1004 * completed.
990 * 1005 *
991 * The future will error if an error occurrs on the transaction or if the 1006 * The future will error if an error occurrs on the transaction or if the
992 * transaction is aborted. 1007 * transaction is aborted.
993 */ 1008 */
994 Future<Database> get completed { 1009 Future<Database> get completed {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 } 1092 }
1078 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1093 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1079 // for details. All rights reserved. Use of this source code is governed by a 1094 // for details. All rights reserved. Use of this source code is governed by a
1080 // BSD-style license that can be found in the LICENSE file. 1095 // BSD-style license that can be found in the LICENSE file.
1081 1096
1082 // WARNING: Do not edit - generated code. 1097 // WARNING: Do not edit - generated code.
1083 1098
1084 1099
1085 @DocsEditable 1100 @DocsEditable
1086 @DomName('IDBVersionChangeEvent') 1101 @DomName('IDBVersionChangeEvent')
1102 @Unstable
1087 class VersionChangeEvent extends Event { 1103 class VersionChangeEvent extends Event {
1088 VersionChangeEvent.internal() : super.internal(); 1104 VersionChangeEvent.internal() : super.internal();
1089 1105
1090 @DomName('IDBVersionChangeEvent.newVersion') 1106 @DomName('IDBVersionChangeEvent.newVersion')
1091 @DocsEditable 1107 @DocsEditable
1092 dynamic get newVersion native "IDBVersionChangeEvent_newVersion_Getter"; 1108 dynamic get newVersion native "IDBVersionChangeEvent_newVersion_Getter";
1093 1109
1094 @DomName('IDBVersionChangeEvent.oldVersion') 1110 @DomName('IDBVersionChangeEvent.oldVersion')
1095 @DocsEditable 1111 @DocsEditable
1096 dynamic get oldVersion native "IDBVersionChangeEvent_oldVersion_Getter"; 1112 dynamic get oldVersion native "IDBVersionChangeEvent_oldVersion_Getter";
1097 1113
1098 } 1114 }
1099 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1115 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1100 // for details. All rights reserved. Use of this source code is governed by a 1116 // for details. All rights reserved. Use of this source code is governed by a
1101 // BSD-style license that can be found in the LICENSE file. 1117 // BSD-style license that can be found in the LICENSE file.
1102 1118
1103 // WARNING: Do not edit - generated code. 1119 // WARNING: Do not edit - generated code.
1104 1120
1105 1121
1106 @DocsEditable 1122 @DocsEditable
1107 @DomName('IDBAny') 1123 @DomName('IDBAny')
1124 @deprecated // nonstandard
1108 abstract class _IDBAny extends NativeFieldWrapperClass1 { 1125 abstract class _IDBAny extends NativeFieldWrapperClass1 {
1109 _IDBAny.internal(); 1126 _IDBAny.internal();
1110 1127
1111 } 1128 }
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