OLD | NEW |
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 import 'dart:_blink' as _blink; | 7 import 'dart:_blink' as _blink; |
8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 8 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
9 // for details. All rights reserved. Use of this source code is governed by a | 9 // for details. All rights reserved. Use of this source code is governed by a |
10 // BSD-style license that can be found in the LICENSE file. | 10 // BSD-style license that can be found in the LICENSE file. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 @DocsEditable() | 98 @DocsEditable() |
99 void advance(int count) => _blink.BlinkIDBCursor.advance_Callback_1(this, coun
t); | 99 void advance(int count) => _blink.BlinkIDBCursor.advance_Callback_1(this, coun
t); |
100 | 100 |
101 @DomName('IDBCursor.continuePrimaryKey') | 101 @DomName('IDBCursor.continuePrimaryKey') |
102 @DocsEditable() | 102 @DocsEditable() |
103 @Experimental() // untriaged | 103 @Experimental() // untriaged |
104 void continuePrimaryKey(Object key, Object primaryKey) => _blink.BlinkIDBCurso
r.continuePrimaryKey_Callback_2(this, key, primaryKey); | 104 void continuePrimaryKey(Object key, Object primaryKey) => _blink.BlinkIDBCurso
r.continuePrimaryKey_Callback_2(this, key, primaryKey); |
105 | 105 |
106 @DomName('IDBCursor.delete') | 106 @DomName('IDBCursor.delete') |
107 @DocsEditable() | 107 @DocsEditable() |
108 Request _delete() => _blink.BlinkIDBCursor.delete_Callback(this); | 108 Request _delete() => _blink.BlinkIDBCursor.delete_Callback_0(this); |
109 | 109 |
110 void next([Object key]) { | 110 void next([Object key]) { |
111 if (key != null) { | 111 if (key != null) { |
112 _blink.BlinkIDBCursor.continue_Callback_1(this, key); | 112 _blink.BlinkIDBCursor.continue_Callback_1(this, key); |
113 return; | 113 return; |
114 } | 114 } |
115 _blink.BlinkIDBCursor.continue_Callback(this); | 115 _blink.BlinkIDBCursor.continue_Callback_0(this); |
116 return; | 116 return; |
117 } | 117 } |
118 | 118 |
119 @DomName('IDBCursor.update') | 119 @DomName('IDBCursor.update') |
120 @DocsEditable() | 120 @DocsEditable() |
121 Request _update(Object value) => _blink.BlinkIDBCursor.update_Callback_1(this,
value); | 121 Request _update(Object value) => _blink.BlinkIDBCursor.update_Callback_1(this,
value); |
122 | 122 |
123 } | 123 } |
124 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 124 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
125 // for details. All rights reserved. Use of this source code is governed by a | 125 // for details. All rights reserved. Use of this source code is governed by a |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 @DomName('IDBDatabase.objectStoreNames') | 225 @DomName('IDBDatabase.objectStoreNames') |
226 @DocsEditable() | 226 @DocsEditable() |
227 List<String> get objectStoreNames => _blink.BlinkIDBDatabase.objectStoreNames_
Getter(this); | 227 List<String> get objectStoreNames => _blink.BlinkIDBDatabase.objectStoreNames_
Getter(this); |
228 | 228 |
229 @DomName('IDBDatabase.version') | 229 @DomName('IDBDatabase.version') |
230 @DocsEditable() | 230 @DocsEditable() |
231 Object get version => _blink.BlinkIDBDatabase.version_Getter(this); | 231 Object get version => _blink.BlinkIDBDatabase.version_Getter(this); |
232 | 232 |
233 @DomName('IDBDatabase.close') | 233 @DomName('IDBDatabase.close') |
234 @DocsEditable() | 234 @DocsEditable() |
235 void close() => _blink.BlinkIDBDatabase.close_Callback(this); | 235 void close() => _blink.BlinkIDBDatabase.close_Callback_0(this); |
236 | 236 |
237 ObjectStore _createObjectStore(String name, [Map options]) { | 237 ObjectStore _createObjectStore(String name, [Map options]) { |
238 if (options != null) { | 238 if (options != null) { |
239 return _blink.BlinkIDBDatabase.createObjectStore_Callback_2(this, name, op
tions); | 239 return _blink.BlinkIDBDatabase.createObjectStore_Callback_2(this, name, op
tions); |
240 } | 240 } |
241 return _blink.BlinkIDBDatabase.createObjectStore_Callback_1(this, name); | 241 return _blink.BlinkIDBDatabase.createObjectStore_Callback_1(this, name); |
242 } | 242 } |
243 | 243 |
244 @DomName('IDBDatabase.deleteObjectStore') | 244 @DomName('IDBDatabase.deleteObjectStore') |
245 @DocsEditable() | 245 @DocsEditable() |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 return _blink.BlinkIDBFactory.open_Callback_2(this, name, version); | 413 return _blink.BlinkIDBFactory.open_Callback_2(this, name, version); |
414 } | 414 } |
415 return _blink.BlinkIDBFactory.open_Callback_1(this, name); | 415 return _blink.BlinkIDBFactory.open_Callback_1(this, name); |
416 } | 416 } |
417 | 417 |
418 @DomName('IDBFactory.webkitGetDatabaseNames') | 418 @DomName('IDBFactory.webkitGetDatabaseNames') |
419 @DocsEditable() | 419 @DocsEditable() |
420 @SupportedBrowser(SupportedBrowser.CHROME) | 420 @SupportedBrowser(SupportedBrowser.CHROME) |
421 @SupportedBrowser(SupportedBrowser.SAFARI) | 421 @SupportedBrowser(SupportedBrowser.SAFARI) |
422 @Experimental() | 422 @Experimental() |
423 Request _webkitGetDatabaseNames() => _blink.BlinkIDBFactory.webkitGetDatabaseN
ames_Callback(this); | 423 Request _webkitGetDatabaseNames() => _blink.BlinkIDBFactory.webkitGetDatabaseN
ames_Callback_0(this); |
424 | 424 |
425 } | 425 } |
426 | 426 |
427 | 427 |
428 /** | 428 /** |
429 * Ties a request to a completer, so the completer is completed when it succeeds | 429 * Ties a request to a completer, so the completer is completed when it succeeds |
430 * and errors out when the request errors. | 430 * and errors out when the request errors. |
431 */ | 431 */ |
432 Future _completeRequest(Request request) { | 432 Future _completeRequest(Request request) { |
433 var completer = new Completer.sync(); | 433 var completer = new Completer.sync(); |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 | 820 |
821 Request _add(Object value, [Object key]) { | 821 Request _add(Object value, [Object key]) { |
822 if (key != null) { | 822 if (key != null) { |
823 return _blink.BlinkIDBObjectStore.add_Callback_2(this, value, key); | 823 return _blink.BlinkIDBObjectStore.add_Callback_2(this, value, key); |
824 } | 824 } |
825 return _blink.BlinkIDBObjectStore.add_Callback_1(this, value); | 825 return _blink.BlinkIDBObjectStore.add_Callback_1(this, value); |
826 } | 826 } |
827 | 827 |
828 @DomName('IDBObjectStore.clear') | 828 @DomName('IDBObjectStore.clear') |
829 @DocsEditable() | 829 @DocsEditable() |
830 Request _clear() => _blink.BlinkIDBObjectStore.clear_Callback(this); | 830 Request _clear() => _blink.BlinkIDBObjectStore.clear_Callback_0(this); |
831 | 831 |
832 @DomName('IDBObjectStore.count') | 832 @DomName('IDBObjectStore.count') |
833 @DocsEditable() | 833 @DocsEditable() |
834 Request _count(Object key) => _blink.BlinkIDBObjectStore.count_Callback_1(this
, key); | 834 Request _count(Object key) => _blink.BlinkIDBObjectStore.count_Callback_1(this
, key); |
835 | 835 |
836 Index _createIndex(String name, keyPath, [Map options]) { | 836 Index _createIndex(String name, keyPath, [Map options]) { |
837 if ((keyPath is String || keyPath == null) && (name is String || name == nul
l) && options == null) { | 837 if ((keyPath is String || keyPath == null) && (name is String || name == nul
l) && options == null) { |
838 return _blink.BlinkIDBObjectStore.createIndex_Callback_2(this, name, keyPa
th); | 838 return _blink.BlinkIDBObjectStore.createIndex_Callback_2(this, name, keyPa
th); |
839 } | 839 } |
840 if ((options is Map || options == null) && (keyPath is String || keyPath ==
null) && (name is String || name == null)) { | 840 if ((options is Map || options == null) && (keyPath is String || keyPath ==
null) && (name is String || name == null)) { |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 @DomName('IDBTransaction.error') | 1101 @DomName('IDBTransaction.error') |
1102 @DocsEditable() | 1102 @DocsEditable() |
1103 DomError get error => _blink.BlinkIDBTransaction.error_Getter(this); | 1103 DomError get error => _blink.BlinkIDBTransaction.error_Getter(this); |
1104 | 1104 |
1105 @DomName('IDBTransaction.mode') | 1105 @DomName('IDBTransaction.mode') |
1106 @DocsEditable() | 1106 @DocsEditable() |
1107 String get mode => _blink.BlinkIDBTransaction.mode_Getter(this); | 1107 String get mode => _blink.BlinkIDBTransaction.mode_Getter(this); |
1108 | 1108 |
1109 @DomName('IDBTransaction.abort') | 1109 @DomName('IDBTransaction.abort') |
1110 @DocsEditable() | 1110 @DocsEditable() |
1111 void abort() => _blink.BlinkIDBTransaction.abort_Callback(this); | 1111 void abort() => _blink.BlinkIDBTransaction.abort_Callback_0(this); |
1112 | 1112 |
1113 @DomName('IDBTransaction.objectStore') | 1113 @DomName('IDBTransaction.objectStore') |
1114 @DocsEditable() | 1114 @DocsEditable() |
1115 ObjectStore objectStore(String name) => _blink.BlinkIDBTransaction.objectStore
_Callback_1(this, name); | 1115 ObjectStore objectStore(String name) => _blink.BlinkIDBTransaction.objectStore
_Callback_1(this, name); |
1116 | 1116 |
1117 /// Stream of `abort` events handled by this [Transaction]. | 1117 /// Stream of `abort` events handled by this [Transaction]. |
1118 @DomName('IDBTransaction.onabort') | 1118 @DomName('IDBTransaction.onabort') |
1119 @DocsEditable() | 1119 @DocsEditable() |
1120 Stream<Event> get onAbort => abortEvent.forTarget(this); | 1120 Stream<Event> get onAbort => abortEvent.forTarget(this); |
1121 | 1121 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 | 1156 |
1157 @DomName('IDBVersionChangeEvent.newVersion') | 1157 @DomName('IDBVersionChangeEvent.newVersion') |
1158 @DocsEditable() | 1158 @DocsEditable() |
1159 int get newVersion => _blink.BlinkIDBVersionChangeEvent.newVersion_Getter(this
); | 1159 int get newVersion => _blink.BlinkIDBVersionChangeEvent.newVersion_Getter(this
); |
1160 | 1160 |
1161 @DomName('IDBVersionChangeEvent.oldVersion') | 1161 @DomName('IDBVersionChangeEvent.oldVersion') |
1162 @DocsEditable() | 1162 @DocsEditable() |
1163 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.oldVersion_Getter(this
); | 1163 int get oldVersion => _blink.BlinkIDBVersionChangeEvent.oldVersion_Getter(this
); |
1164 | 1164 |
1165 } | 1165 } |
OLD | NEW |