| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 void close() => _blink.Native_IDBDatabase_close_Callback(this); | 216 void close() => _blink.Native_IDBDatabase_close_Callback(this); |
| 217 | 217 |
| 218 @DomName('IDBDatabase.createObjectStore') | 218 @DomName('IDBDatabase.createObjectStore') |
| 219 @DocsEditable() | 219 @DocsEditable() |
| 220 ObjectStore _createObjectStore(String name, [Map options]) => _blink.Native_ID
BDatabase_createObjectStore_Callback(this, name, options); | 220 ObjectStore _createObjectStore(String name, [Map options]) => _blink.Native_ID
BDatabase_createObjectStore_Callback(this, name, options); |
| 221 | 221 |
| 222 @DomName('IDBDatabase.deleteObjectStore') | 222 @DomName('IDBDatabase.deleteObjectStore') |
| 223 @DocsEditable() | 223 @DocsEditable() |
| 224 void deleteObjectStore(String name) => _blink.Native_IDBDatabase_deleteObjectS
tore_Callback(this, name); | 224 void deleteObjectStore(String name) => _blink.Native_IDBDatabase_deleteObjectS
tore_Callback(this, name); |
| 225 | 225 |
| 226 Transaction transaction(storeName_OR_storeNames, String mode) { | 226 Transaction transaction(storeName_OR_storeNames, String mode) => _blink.Native
_IDBDatabase_transaction(this, storeName_OR_storeNames, mode); |
| 227 if ((mode is String || mode == null) && (storeName_OR_storeNames is List<Str
ing> || storeName_OR_storeNames == null)) { | |
| 228 return _transaction_1(storeName_OR_storeNames, mode); | |
| 229 } | |
| 230 if ((mode is String || mode == null) && (storeName_OR_storeNames is List<Str
ing> || storeName_OR_storeNames == null)) { | |
| 231 return _transaction_2(storeName_OR_storeNames, mode); | |
| 232 } | |
| 233 if ((mode is String || mode == null) && (storeName_OR_storeNames is String |
| storeName_OR_storeNames == null)) { | |
| 234 return _transaction_3(storeName_OR_storeNames, mode); | |
| 235 } | |
| 236 throw new ArgumentError("Incorrect number or type of arguments"); | |
| 237 } | |
| 238 | |
| 239 Transaction _transaction_1(storeName_OR_storeNames, mode) => _blink.Native_IDB
Database__transaction_1_Callback(this, storeName_OR_storeNames, mode); | |
| 240 | |
| 241 Transaction _transaction_2(storeName_OR_storeNames, mode) => _blink.Native_IDB
Database__transaction_2_Callback(this, storeName_OR_storeNames, mode); | |
| 242 | |
| 243 Transaction _transaction_3(storeName_OR_storeNames, mode) => _blink.Native_IDB
Database__transaction_3_Callback(this, storeName_OR_storeNames, mode); | |
| 244 | 227 |
| 245 @DomName('IDBDatabase.transactionList') | 228 @DomName('IDBDatabase.transactionList') |
| 246 @DocsEditable() | 229 @DocsEditable() |
| 247 Transaction transactionList(List<String> storeNames, String mode) => _blink.Na
tive_IDBDatabase_transactionList_Callback(this, storeNames, mode); | 230 Transaction transactionList(List<String> storeNames, String mode) => _blink.Na
tive_IDBDatabase_transactionList_Callback(this, storeNames, mode); |
| 248 | 231 |
| 249 @DomName('IDBDatabase.transactionStore') | 232 @DomName('IDBDatabase.transactionStore') |
| 250 @DocsEditable() | 233 @DocsEditable() |
| 251 Transaction transactionStore(String storeName, String mode) => _blink.Native_I
DBDatabase_transactionStore_Callback(this, storeName, mode); | 234 Transaction transactionStore(String storeName, String mode) => _blink.Native_I
DBDatabase_transactionStore_Callback(this, storeName, mode); |
| 252 | 235 |
| 253 @DomName('IDBDatabase.transactionStores') | 236 @DomName('IDBDatabase.transactionStores') |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 factory IdbFactory._() { throw new UnsupportedError("Not supported"); } | 362 factory IdbFactory._() { throw new UnsupportedError("Not supported"); } |
| 380 | 363 |
| 381 @DomName('IDBFactory.cmp') | 364 @DomName('IDBFactory.cmp') |
| 382 @DocsEditable() | 365 @DocsEditable() |
| 383 int cmp(Object first, Object second) => _blink.Native_IDBFactory_cmp_Callback(
this, first, second); | 366 int cmp(Object first, Object second) => _blink.Native_IDBFactory_cmp_Callback(
this, first, second); |
| 384 | 367 |
| 385 @DomName('IDBFactory.deleteDatabase') | 368 @DomName('IDBFactory.deleteDatabase') |
| 386 @DocsEditable() | 369 @DocsEditable() |
| 387 OpenDBRequest _deleteDatabase(String name) => _blink.Native_IDBFactory_deleteD
atabase_Callback(this, name); | 370 OpenDBRequest _deleteDatabase(String name) => _blink.Native_IDBFactory_deleteD
atabase_Callback(this, name); |
| 388 | 371 |
| 389 OpenDBRequest _open(String name, [int version]) { | 372 OpenDBRequest _open(String name, [int version]) => _blink.Native_IDBFactory__o
pen(this, name, version); |
| 390 if (version != null) { | |
| 391 return _open_1(name, version); | |
| 392 } | |
| 393 return _open_2(name); | |
| 394 } | |
| 395 | |
| 396 OpenDBRequest _open_1(name, version) => _blink.Native_IDBFactory__open_1_Callb
ack(this, name, version); | |
| 397 | |
| 398 OpenDBRequest _open_2(name) => _blink.Native_IDBFactory__open_2_Callback(this,
name); | |
| 399 | 373 |
| 400 @DomName('IDBFactory.webkitGetDatabaseNames') | 374 @DomName('IDBFactory.webkitGetDatabaseNames') |
| 401 @DocsEditable() | 375 @DocsEditable() |
| 402 @SupportedBrowser(SupportedBrowser.CHROME) | 376 @SupportedBrowser(SupportedBrowser.CHROME) |
| 403 @SupportedBrowser(SupportedBrowser.SAFARI) | 377 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 404 @Experimental() | 378 @Experimental() |
| 405 Request _webkitGetDatabaseNames() => _blink.Native_IDBFactory_webkitGetDatabas
eNames_Callback(this); | 379 Request _webkitGetDatabaseNames() => _blink.Native_IDBFactory_webkitGetDatabas
eNames_Callback(this); |
| 406 | 380 |
| 407 } | 381 } |
| 408 | 382 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 Request _add(Object value, [Object key]) => _blink.Native_IDBObjectStore_add_C
allback(this, value, key); | 762 Request _add(Object value, [Object key]) => _blink.Native_IDBObjectStore_add_C
allback(this, value, key); |
| 789 | 763 |
| 790 @DomName('IDBObjectStore.clear') | 764 @DomName('IDBObjectStore.clear') |
| 791 @DocsEditable() | 765 @DocsEditable() |
| 792 Request _clear() => _blink.Native_IDBObjectStore_clear_Callback(this); | 766 Request _clear() => _blink.Native_IDBObjectStore_clear_Callback(this); |
| 793 | 767 |
| 794 @DomName('IDBObjectStore.count') | 768 @DomName('IDBObjectStore.count') |
| 795 @DocsEditable() | 769 @DocsEditable() |
| 796 Request _count(Object key) => _blink.Native_IDBObjectStore_count_Callback(this
, key); | 770 Request _count(Object key) => _blink.Native_IDBObjectStore_count_Callback(this
, key); |
| 797 | 771 |
| 798 Index _createIndex(String name, keyPath, [Map options]) { | 772 Index _createIndex(String name, keyPath, [Map options]) => _blink.Native_IDBOb
jectStore__createIndex(this, name, keyPath, options); |
| 799 if ((options is Map || options == null) && (keyPath is List<String> || keyPa
th == null) && (name is String || name == null)) { | |
| 800 return _createIndex_1(name, keyPath, options); | |
| 801 } | |
| 802 if ((options is Map || options == null) && (keyPath is String || keyPath ==
null) && (name is String || name == null)) { | |
| 803 return _createIndex_2(name, keyPath, options); | |
| 804 } | |
| 805 throw new ArgumentError("Incorrect number or type of arguments"); | |
| 806 } | |
| 807 | |
| 808 Index _createIndex_1(name, keyPath, options) => _blink.Native_IDBObjectStore__
createIndex_1_Callback(this, name, keyPath, options); | |
| 809 | |
| 810 Index _createIndex_2(name, keyPath, options) => _blink.Native_IDBObjectStore__
createIndex_2_Callback(this, name, keyPath, options); | |
| 811 | 773 |
| 812 @DomName('IDBObjectStore.delete') | 774 @DomName('IDBObjectStore.delete') |
| 813 @DocsEditable() | 775 @DocsEditable() |
| 814 Request _delete(Object key) => _blink.Native_IDBObjectStore_delete_Callback(th
is, key); | 776 Request _delete(Object key) => _blink.Native_IDBObjectStore_delete_Callback(th
is, key); |
| 815 | 777 |
| 816 @DomName('IDBObjectStore.deleteIndex') | 778 @DomName('IDBObjectStore.deleteIndex') |
| 817 @DocsEditable() | 779 @DocsEditable() |
| 818 void deleteIndex(String name) => _blink.Native_IDBObjectStore_deleteIndex_Call
back(this, name); | 780 void deleteIndex(String name) => _blink.Native_IDBObjectStore_deleteIndex_Call
back(this, name); |
| 819 | 781 |
| 820 @DomName('IDBObjectStore.get') | 782 @DomName('IDBObjectStore.get') |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1132 | 1094 |
| 1133 @DomName('IDBVersionChangeEvent.newVersion') | 1095 @DomName('IDBVersionChangeEvent.newVersion') |
| 1134 @DocsEditable() | 1096 @DocsEditable() |
| 1135 Object get newVersion => _blink.Native_IDBVersionChangeEvent_newVersion_Getter
(this); | 1097 Object get newVersion => _blink.Native_IDBVersionChangeEvent_newVersion_Getter
(this); |
| 1136 | 1098 |
| 1137 @DomName('IDBVersionChangeEvent.oldVersion') | 1099 @DomName('IDBVersionChangeEvent.oldVersion') |
| 1138 @DocsEditable() | 1100 @DocsEditable() |
| 1139 Object get oldVersion => _blink.Native_IDBVersionChangeEvent_oldVersion_Getter
(this); | 1101 Object get oldVersion => _blink.Native_IDBVersionChangeEvent_oldVersion_Getter
(this); |
| 1140 | 1102 |
| 1141 } | 1103 } |
| OLD | NEW |