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

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

Issue 56933002: Version 0.8.10.1 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 options['autoIncrement'] = autoIncrement; 144 options['autoIncrement'] = autoIncrement;
145 } 145 }
146 146
147 return _createObjectStore(name, options); 147 return _createObjectStore(name, options);
148 } 148 }
149 149
150 150
151 // To suppress missing implicit constructor warnings. 151 // To suppress missing implicit constructor warnings.
152 factory Database._() { throw new UnsupportedError("Not supported"); } 152 factory Database._() { throw new UnsupportedError("Not supported"); }
153 153
154 /**
155 * Static factory designed to expose `abort` events to event
156 * handlers that are not necessarily instances of [Database].
157 *
158 * See [EventStreamProvider] for usage information.
159 */
154 @DomName('IDBDatabase.abortEvent') 160 @DomName('IDBDatabase.abortEvent')
155 @DocsEditable() 161 @DocsEditable()
156 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider <Event>('abort'); 162 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider <Event>('abort');
157 163
164 /**
165 * Static factory designed to expose `close` events to event
166 * handlers that are not necessarily instances of [Database].
167 *
168 * See [EventStreamProvider] for usage information.
169 */
158 @DomName('IDBDatabase.closeEvent') 170 @DomName('IDBDatabase.closeEvent')
159 @DocsEditable() 171 @DocsEditable()
160 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22540 172 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22540
161 @Experimental() 173 @Experimental()
162 static const EventStreamProvider<Event> closeEvent = const EventStreamProvider <Event>('close'); 174 static const EventStreamProvider<Event> closeEvent = const EventStreamProvider <Event>('close');
163 175
176 /**
177 * Static factory designed to expose `error` events to event
178 * handlers that are not necessarily instances of [Database].
179 *
180 * See [EventStreamProvider] for usage information.
181 */
164 @DomName('IDBDatabase.errorEvent') 182 @DomName('IDBDatabase.errorEvent')
165 @DocsEditable() 183 @DocsEditable()
166 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider <Event>('error'); 184 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider <Event>('error');
167 185
186 /**
187 * Static factory designed to expose `versionchange` events to event
188 * handlers that are not necessarily instances of [Database].
189 *
190 * See [EventStreamProvider] for usage information.
191 */
168 @DomName('IDBDatabase.versionchangeEvent') 192 @DomName('IDBDatabase.versionchangeEvent')
169 @DocsEditable() 193 @DocsEditable()
170 static const EventStreamProvider<VersionChangeEvent> versionChangeEvent = cons t EventStreamProvider<VersionChangeEvent>('versionchange'); 194 static const EventStreamProvider<VersionChangeEvent> versionChangeEvent = cons t EventStreamProvider<VersionChangeEvent>('versionchange');
171 195
172 @DomName('IDBDatabase.name') 196 @DomName('IDBDatabase.name')
173 @DocsEditable() 197 @DocsEditable()
174 String get name native "IDBDatabase_name_Getter"; 198 String get name native "IDBDatabase_name_Getter";
175 199
176 @DomName('IDBDatabase.objectStoreNames') 200 @DomName('IDBDatabase.objectStoreNames')
177 @DocsEditable() 201 @DocsEditable()
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 void addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBDatabase_addEventListener_Callback"; 253 void addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBDatabase_addEventListener_Callback";
230 254
231 @DomName('IDBDatabase.dispatchEvent') 255 @DomName('IDBDatabase.dispatchEvent')
232 @DocsEditable() 256 @DocsEditable()
233 bool dispatchEvent(Event event) native "IDBDatabase_dispatchEvent_Callback"; 257 bool dispatchEvent(Event event) native "IDBDatabase_dispatchEvent_Callback";
234 258
235 @DomName('IDBDatabase.removeEventListener') 259 @DomName('IDBDatabase.removeEventListener')
236 @DocsEditable() 260 @DocsEditable()
237 void removeEventListener(String type, EventListener listener, [bool useCapture ]) native "IDBDatabase_removeEventListener_Callback"; 261 void removeEventListener(String type, EventListener listener, [bool useCapture ]) native "IDBDatabase_removeEventListener_Callback";
238 262
263 /// Stream of `abort` events handled by this [Database].
239 @DomName('IDBDatabase.onabort') 264 @DomName('IDBDatabase.onabort')
240 @DocsEditable() 265 @DocsEditable()
241 Stream<Event> get onAbort => abortEvent.forTarget(this); 266 Stream<Event> get onAbort => abortEvent.forTarget(this);
242 267
268 /// Stream of `close` events handled by this [Database].
243 @DomName('IDBDatabase.onclose') 269 @DomName('IDBDatabase.onclose')
244 @DocsEditable() 270 @DocsEditable()
245 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22540 271 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22540
246 @Experimental() 272 @Experimental()
247 Stream<Event> get onClose => closeEvent.forTarget(this); 273 Stream<Event> get onClose => closeEvent.forTarget(this);
248 274
275 /// Stream of `error` events handled by this [Database].
249 @DomName('IDBDatabase.onerror') 276 @DomName('IDBDatabase.onerror')
250 @DocsEditable() 277 @DocsEditable()
251 Stream<Event> get onError => errorEvent.forTarget(this); 278 Stream<Event> get onError => errorEvent.forTarget(this);
252 279
280 /// Stream of `versionchange` events handled by this [Database].
253 @DomName('IDBDatabase.onversionchange') 281 @DomName('IDBDatabase.onversionchange')
254 @DocsEditable() 282 @DocsEditable()
255 Stream<VersionChangeEvent> get onVersionChange => versionChangeEvent.forTarget (this); 283 Stream<VersionChangeEvent> get onVersionChange => versionChangeEvent.forTarget (this);
256 } 284 }
257 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 285 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
258 // for details. All rights reserved. Use of this source code is governed by a 286 // 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. 287 // BSD-style license that can be found in the LICENSE file.
260 288
261 289
262 @DomName('IDBFactory') 290 @DomName('IDBFactory')
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 // WARNING: Do not edit - generated code. 862 // WARNING: Do not edit - generated code.
835 863
836 864
837 @DocsEditable() 865 @DocsEditable()
838 @DomName('IDBOpenDBRequest') 866 @DomName('IDBOpenDBRequest')
839 @Unstable() 867 @Unstable()
840 class OpenDBRequest extends Request { 868 class OpenDBRequest extends Request {
841 // To suppress missing implicit constructor warnings. 869 // To suppress missing implicit constructor warnings.
842 factory OpenDBRequest._() { throw new UnsupportedError("Not supported"); } 870 factory OpenDBRequest._() { throw new UnsupportedError("Not supported"); }
843 871
872 /**
873 * Static factory designed to expose `blocked` events to event
874 * handlers that are not necessarily instances of [OpenDBRequest].
875 *
876 * See [EventStreamProvider] for usage information.
877 */
844 @DomName('IDBOpenDBRequest.blockedEvent') 878 @DomName('IDBOpenDBRequest.blockedEvent')
845 @DocsEditable() 879 @DocsEditable()
846 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid er<Event>('blocked'); 880 static const EventStreamProvider<Event> blockedEvent = const EventStreamProvid er<Event>('blocked');
847 881
882 /**
883 * Static factory designed to expose `upgradeneeded` events to event
884 * handlers that are not necessarily instances of [OpenDBRequest].
885 *
886 * See [EventStreamProvider] for usage information.
887 */
848 @DomName('IDBOpenDBRequest.upgradeneededEvent') 888 @DomName('IDBOpenDBRequest.upgradeneededEvent')
849 @DocsEditable() 889 @DocsEditable()
850 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons t EventStreamProvider<VersionChangeEvent>('upgradeneeded'); 890 static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = cons t EventStreamProvider<VersionChangeEvent>('upgradeneeded');
851 891
892 /// Stream of `blocked` events handled by this [OpenDBRequest].
852 @DomName('IDBOpenDBRequest.onblocked') 893 @DomName('IDBOpenDBRequest.onblocked')
853 @DocsEditable() 894 @DocsEditable()
854 Stream<Event> get onBlocked => blockedEvent.forTarget(this); 895 Stream<Event> get onBlocked => blockedEvent.forTarget(this);
855 896
897 /// Stream of `upgradeneeded` events handled by this [OpenDBRequest].
856 @DomName('IDBOpenDBRequest.onupgradeneeded') 898 @DomName('IDBOpenDBRequest.onupgradeneeded')
857 @DocsEditable() 899 @DocsEditable()
858 Stream<VersionChangeEvent> get onUpgradeNeeded => upgradeNeededEvent.forTarget (this); 900 Stream<VersionChangeEvent> get onUpgradeNeeded => upgradeNeededEvent.forTarget (this);
859 901
860 } 902 }
861 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 903 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
862 // for details. All rights reserved. Use of this source code is governed by a 904 // for details. All rights reserved. Use of this source code is governed by a
863 // BSD-style license that can be found in the LICENSE file. 905 // BSD-style license that can be found in the LICENSE file.
864 906
865 // WARNING: Do not edit - generated code. 907 // WARNING: Do not edit - generated code.
866 908
867 909
868 @DocsEditable() 910 @DocsEditable()
869 @DomName('IDBRequest') 911 @DomName('IDBRequest')
870 @Unstable() 912 @Unstable()
871 class Request extends EventTarget { 913 class Request extends EventTarget {
872 // To suppress missing implicit constructor warnings. 914 // To suppress missing implicit constructor warnings.
873 factory Request._() { throw new UnsupportedError("Not supported"); } 915 factory Request._() { throw new UnsupportedError("Not supported"); }
874 916
917 /**
918 * Static factory designed to expose `error` events to event
919 * handlers that are not necessarily instances of [Request].
920 *
921 * See [EventStreamProvider] for usage information.
922 */
875 @DomName('IDBRequest.errorEvent') 923 @DomName('IDBRequest.errorEvent')
876 @DocsEditable() 924 @DocsEditable()
877 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider <Event>('error'); 925 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider <Event>('error');
878 926
927 /**
928 * Static factory designed to expose `success` events to event
929 * handlers that are not necessarily instances of [Request].
930 *
931 * See [EventStreamProvider] for usage information.
932 */
879 @DomName('IDBRequest.successEvent') 933 @DomName('IDBRequest.successEvent')
880 @DocsEditable() 934 @DocsEditable()
881 static const EventStreamProvider<Event> successEvent = const EventStreamProvid er<Event>('success'); 935 static const EventStreamProvider<Event> successEvent = const EventStreamProvid er<Event>('success');
882 936
883 @DomName('IDBRequest.error') 937 @DomName('IDBRequest.error')
884 @DocsEditable() 938 @DocsEditable()
885 DomError get error native "IDBRequest_error_Getter"; 939 DomError get error native "IDBRequest_error_Getter";
886 940
887 @DomName('IDBRequest.readyState') 941 @DomName('IDBRequest.readyState')
888 @DocsEditable() 942 @DocsEditable()
(...skipping 16 matching lines...) Expand all
905 void addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBRequest_addEventListener_Callback"; 959 void addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBRequest_addEventListener_Callback";
906 960
907 @DomName('IDBRequest.dispatchEvent') 961 @DomName('IDBRequest.dispatchEvent')
908 @DocsEditable() 962 @DocsEditable()
909 bool dispatchEvent(Event event) native "IDBRequest_dispatchEvent_Callback"; 963 bool dispatchEvent(Event event) native "IDBRequest_dispatchEvent_Callback";
910 964
911 @DomName('IDBRequest.removeEventListener') 965 @DomName('IDBRequest.removeEventListener')
912 @DocsEditable() 966 @DocsEditable()
913 void removeEventListener(String type, EventListener listener, [bool useCapture ]) native "IDBRequest_removeEventListener_Callback"; 967 void removeEventListener(String type, EventListener listener, [bool useCapture ]) native "IDBRequest_removeEventListener_Callback";
914 968
969 /// Stream of `error` events handled by this [Request].
915 @DomName('IDBRequest.onerror') 970 @DomName('IDBRequest.onerror')
916 @DocsEditable() 971 @DocsEditable()
917 Stream<Event> get onError => errorEvent.forTarget(this); 972 Stream<Event> get onError => errorEvent.forTarget(this);
918 973
974 /// Stream of `success` events handled by this [Request].
919 @DomName('IDBRequest.onsuccess') 975 @DomName('IDBRequest.onsuccess')
920 @DocsEditable() 976 @DocsEditable()
921 Stream<Event> get onSuccess => successEvent.forTarget(this); 977 Stream<Event> get onSuccess => successEvent.forTarget(this);
922 978
923 } 979 }
924 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 980 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
925 // for details. All rights reserved. Use of this source code is governed by a 981 // for details. All rights reserved. Use of this source code is governed by a
926 // BSD-style license that can be found in the LICENSE file. 982 // BSD-style license that can be found in the LICENSE file.
927 983
928 984
(...skipping 25 matching lines...) Expand all
954 completer.completeError(e); 1010 completer.completeError(e);
955 } 1011 }
956 }); 1012 });
957 1013
958 return completer.future; 1014 return completer.future;
959 } 1015 }
960 1016
961 // To suppress missing implicit constructor warnings. 1017 // To suppress missing implicit constructor warnings.
962 factory Transaction._() { throw new UnsupportedError("Not supported"); } 1018 factory Transaction._() { throw new UnsupportedError("Not supported"); }
963 1019
1020 /**
1021 * Static factory designed to expose `abort` events to event
1022 * handlers that are not necessarily instances of [Transaction].
1023 *
1024 * See [EventStreamProvider] for usage information.
1025 */
964 @DomName('IDBTransaction.abortEvent') 1026 @DomName('IDBTransaction.abortEvent')
965 @DocsEditable() 1027 @DocsEditable()
966 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider <Event>('abort'); 1028 static const EventStreamProvider<Event> abortEvent = const EventStreamProvider <Event>('abort');
967 1029
1030 /**
1031 * Static factory designed to expose `complete` events to event
1032 * handlers that are not necessarily instances of [Transaction].
1033 *
1034 * See [EventStreamProvider] for usage information.
1035 */
968 @DomName('IDBTransaction.completeEvent') 1036 @DomName('IDBTransaction.completeEvent')
969 @DocsEditable() 1037 @DocsEditable()
970 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi der<Event>('complete'); 1038 static const EventStreamProvider<Event> completeEvent = const EventStreamProvi der<Event>('complete');
971 1039
1040 /**
1041 * Static factory designed to expose `error` events to event
1042 * handlers that are not necessarily instances of [Transaction].
1043 *
1044 * See [EventStreamProvider] for usage information.
1045 */
972 @DomName('IDBTransaction.errorEvent') 1046 @DomName('IDBTransaction.errorEvent')
973 @DocsEditable() 1047 @DocsEditable()
974 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider <Event>('error'); 1048 static const EventStreamProvider<Event> errorEvent = const EventStreamProvider <Event>('error');
975 1049
976 @DomName('IDBTransaction.db') 1050 @DomName('IDBTransaction.db')
977 @DocsEditable() 1051 @DocsEditable()
978 Database get db native "IDBTransaction_db_Getter"; 1052 Database get db native "IDBTransaction_db_Getter";
979 1053
980 @DomName('IDBTransaction.error') 1054 @DomName('IDBTransaction.error')
981 @DocsEditable() 1055 @DocsEditable()
(...skipping 16 matching lines...) Expand all
998 void addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBTransaction_addEventListener_Callback"; 1072 void addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBTransaction_addEventListener_Callback";
999 1073
1000 @DomName('IDBTransaction.dispatchEvent') 1074 @DomName('IDBTransaction.dispatchEvent')
1001 @DocsEditable() 1075 @DocsEditable()
1002 bool dispatchEvent(Event event) native "IDBTransaction_dispatchEvent_Callback" ; 1076 bool dispatchEvent(Event event) native "IDBTransaction_dispatchEvent_Callback" ;
1003 1077
1004 @DomName('IDBTransaction.removeEventListener') 1078 @DomName('IDBTransaction.removeEventListener')
1005 @DocsEditable() 1079 @DocsEditable()
1006 void removeEventListener(String type, EventListener listener, [bool useCapture ]) native "IDBTransaction_removeEventListener_Callback"; 1080 void removeEventListener(String type, EventListener listener, [bool useCapture ]) native "IDBTransaction_removeEventListener_Callback";
1007 1081
1082 /// Stream of `abort` events handled by this [Transaction].
1008 @DomName('IDBTransaction.onabort') 1083 @DomName('IDBTransaction.onabort')
1009 @DocsEditable() 1084 @DocsEditable()
1010 Stream<Event> get onAbort => abortEvent.forTarget(this); 1085 Stream<Event> get onAbort => abortEvent.forTarget(this);
1011 1086
1087 /// Stream of `complete` events handled by this [Transaction].
1012 @DomName('IDBTransaction.oncomplete') 1088 @DomName('IDBTransaction.oncomplete')
1013 @DocsEditable() 1089 @DocsEditable()
1014 Stream<Event> get onComplete => completeEvent.forTarget(this); 1090 Stream<Event> get onComplete => completeEvent.forTarget(this);
1015 1091
1092 /// Stream of `error` events handled by this [Transaction].
1016 @DomName('IDBTransaction.onerror') 1093 @DomName('IDBTransaction.onerror')
1017 @DocsEditable() 1094 @DocsEditable()
1018 Stream<Event> get onError => errorEvent.forTarget(this); 1095 Stream<Event> get onError => errorEvent.forTarget(this);
1019 1096
1020 } 1097 }
1021 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1098 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1022 // for details. All rights reserved. Use of this source code is governed by a 1099 // for details. All rights reserved. Use of this source code is governed by a
1023 // BSD-style license that can be found in the LICENSE file. 1100 // BSD-style license that can be found in the LICENSE file.
1024 1101
1025 // WARNING: Do not edit - generated code. 1102 // WARNING: Do not edit - generated code.
(...skipping 28 matching lines...) Expand all
1054 1131
1055 1132
1056 @DocsEditable() 1133 @DocsEditable()
1057 @DomName('IDBAny') 1134 @DomName('IDBAny')
1058 @deprecated // nonstandard 1135 @deprecated // nonstandard
1059 abstract class _IDBAny extends NativeFieldWrapperClass2 { 1136 abstract class _IDBAny extends NativeFieldWrapperClass2 {
1060 // To suppress missing implicit constructor warnings. 1137 // To suppress missing implicit constructor warnings.
1061 factory _IDBAny._() { throw new UnsupportedError("Not supported"); } 1138 factory _IDBAny._() { throw new UnsupportedError("Not supported"); }
1062 1139
1063 } 1140 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart ('k') | dart/sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698