| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 void close() => _blink.BlinkIDBDatabase.$close_Callback(this); | 231 void close() => _blink.BlinkIDBDatabase.$close_Callback(this); |
| 232 | 232 |
| 233 @DomName('IDBDatabase.createObjectStore') | 233 @DomName('IDBDatabase.createObjectStore') |
| 234 @DocsEditable() | 234 @DocsEditable() |
| 235 ObjectStore _createObjectStore(String name, [Map options]) => _blink.BlinkIDBD
atabase.$createObjectStore_Callback(this, name, options); | 235 ObjectStore _createObjectStore(String name, [Map options]) => _blink.BlinkIDBD
atabase.$createObjectStore_Callback(this, name, options); |
| 236 | 236 |
| 237 @DomName('IDBDatabase.deleteObjectStore') | 237 @DomName('IDBDatabase.deleteObjectStore') |
| 238 @DocsEditable() | 238 @DocsEditable() |
| 239 void deleteObjectStore(String name) => _blink.BlinkIDBDatabase.$deleteObjectSt
ore_Callback(this, name); | 239 void deleteObjectStore(String name) => _blink.BlinkIDBDatabase.$deleteObjectSt
ore_Callback(this, name); |
| 240 | 240 |
| 241 Transaction transaction(storeName_OR_storeNames, String mode) => _blink.BlinkI
DBDatabase.$transaction(this, storeName_OR_storeNames, mode); | 241 Transaction transaction(storeName_OR_storeNames, String mode) { |
| 242 if ((mode is String || mode == null) && (storeName_OR_storeNames is DomStrin
gList || storeName_OR_storeNames == null)) { |
| 243 return _blink.BlinkIDBDatabase.$_transaction_1_Callback(this, storeName_OR
_storeNames, mode); |
| 244 } |
| 245 if ((mode is String || mode == null) && (storeName_OR_storeNames is List<Str
ing> || storeName_OR_storeNames == null)) { |
| 246 return _blink.BlinkIDBDatabase.$_transaction_2_Callback(this, storeName_OR
_storeNames, mode); |
| 247 } |
| 248 if ((mode is String || mode == null) && (storeName_OR_storeNames is String |
| storeName_OR_storeNames == null)) { |
| 249 return _blink.BlinkIDBDatabase.$_transaction_3_Callback(this, storeName_OR
_storeNames, mode); |
| 250 } |
| 251 throw new ArgumentError("Incorrect number or type of arguments"); |
| 252 } |
| 242 | 253 |
| 243 @DomName('IDBDatabase.transactionList') | 254 @DomName('IDBDatabase.transactionList') |
| 244 @DocsEditable() | 255 @DocsEditable() |
| 245 Transaction transactionList(List<String> storeNames, String mode) => _blink.Bl
inkIDBDatabase.$transactionList_Callback(this, storeNames, mode); | 256 Transaction transactionList(List<String> storeNames, String mode) => _blink.Bl
inkIDBDatabase.$transactionList_Callback(this, storeNames, mode); |
| 246 | 257 |
| 247 @DomName('IDBDatabase.transactionStore') | 258 @DomName('IDBDatabase.transactionStore') |
| 248 @DocsEditable() | 259 @DocsEditable() |
| 249 Transaction transactionStore(String storeName, String mode) => _blink.BlinkIDB
Database.$transactionStore_Callback(this, storeName, mode); | 260 Transaction transactionStore(String storeName, String mode) => _blink.BlinkIDB
Database.$transactionStore_Callback(this, storeName, mode); |
| 250 | 261 |
| 251 @DomName('IDBDatabase.transactionStores') | 262 @DomName('IDBDatabase.transactionStores') |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 factory IdbFactory._() { throw new UnsupportedError("Not supported"); } | 376 factory IdbFactory._() { throw new UnsupportedError("Not supported"); } |
| 366 | 377 |
| 367 @DomName('IDBFactory.cmp') | 378 @DomName('IDBFactory.cmp') |
| 368 @DocsEditable() | 379 @DocsEditable() |
| 369 int cmp(Object first, Object second) => _blink.BlinkIDBFactory.$cmp_Callback(t
his, first, second); | 380 int cmp(Object first, Object second) => _blink.BlinkIDBFactory.$cmp_Callback(t
his, first, second); |
| 370 | 381 |
| 371 @DomName('IDBFactory.deleteDatabase') | 382 @DomName('IDBFactory.deleteDatabase') |
| 372 @DocsEditable() | 383 @DocsEditable() |
| 373 OpenDBRequest _deleteDatabase(String name) => _blink.BlinkIDBFactory.$deleteDa
tabase_Callback(this, name); | 384 OpenDBRequest _deleteDatabase(String name) => _blink.BlinkIDBFactory.$deleteDa
tabase_Callback(this, name); |
| 374 | 385 |
| 375 OpenDBRequest _open(String name, [int version]) => _blink.BlinkIDBFactory.$_op
en(this, name, version); | 386 OpenDBRequest _open(String name, [int version]) { |
| 387 if (version != null) { |
| 388 return _blink.BlinkIDBFactory.$_open_1_Callback(this, name, version); |
| 389 } |
| 390 return _blink.BlinkIDBFactory.$_open_2_Callback(this, name); |
| 391 } |
| 376 | 392 |
| 377 @DomName('IDBFactory.webkitGetDatabaseNames') | 393 @DomName('IDBFactory.webkitGetDatabaseNames') |
| 378 @DocsEditable() | 394 @DocsEditable() |
| 379 @SupportedBrowser(SupportedBrowser.CHROME) | 395 @SupportedBrowser(SupportedBrowser.CHROME) |
| 380 @SupportedBrowser(SupportedBrowser.SAFARI) | 396 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 381 @Experimental() | 397 @Experimental() |
| 382 Request _webkitGetDatabaseNames() => _blink.BlinkIDBFactory.$webkitGetDatabase
Names_Callback(this); | 398 Request _webkitGetDatabaseNames() => _blink.BlinkIDBFactory.$webkitGetDatabase
Names_Callback(this); |
| 383 | 399 |
| 384 } | 400 } |
| 385 | 401 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 Request _add(Object value, [Object key]) => _blink.BlinkIDBObjectStore.$add_Ca
llback(this, value, key); | 781 Request _add(Object value, [Object key]) => _blink.BlinkIDBObjectStore.$add_Ca
llback(this, value, key); |
| 766 | 782 |
| 767 @DomName('IDBObjectStore.clear') | 783 @DomName('IDBObjectStore.clear') |
| 768 @DocsEditable() | 784 @DocsEditable() |
| 769 Request _clear() => _blink.BlinkIDBObjectStore.$clear_Callback(this); | 785 Request _clear() => _blink.BlinkIDBObjectStore.$clear_Callback(this); |
| 770 | 786 |
| 771 @DomName('IDBObjectStore.count') | 787 @DomName('IDBObjectStore.count') |
| 772 @DocsEditable() | 788 @DocsEditable() |
| 773 Request _count(Object key) => _blink.BlinkIDBObjectStore.$count_Callback(this,
key); | 789 Request _count(Object key) => _blink.BlinkIDBObjectStore.$count_Callback(this,
key); |
| 774 | 790 |
| 775 Index _createIndex(String name, keyPath, [Map options]) => _blink.BlinkIDBObje
ctStore.$_createIndex(this, name, keyPath, options); | 791 Index _createIndex(String name, keyPath, [Map options]) { |
| 792 if ((options is Map || options == null) && (keyPath is List<String> || keyPa
th == null) && (name is String || name == null)) { |
| 793 return _blink.BlinkIDBObjectStore.$_createIndex_1_Callback(this, name, key
Path, options); |
| 794 } |
| 795 if ((options is Map || options == null) && (keyPath is String || keyPath ==
null) && (name is String || name == null)) { |
| 796 return _blink.BlinkIDBObjectStore.$_createIndex_2_Callback(this, name, key
Path, options); |
| 797 } |
| 798 throw new ArgumentError("Incorrect number or type of arguments"); |
| 799 } |
| 776 | 800 |
| 777 @DomName('IDBObjectStore.delete') | 801 @DomName('IDBObjectStore.delete') |
| 778 @DocsEditable() | 802 @DocsEditable() |
| 779 Request _delete(Object key) => _blink.BlinkIDBObjectStore.$delete_Callback(thi
s, key); | 803 Request _delete(Object key) => _blink.BlinkIDBObjectStore.$delete_Callback(thi
s, key); |
| 780 | 804 |
| 781 @DomName('IDBObjectStore.deleteIndex') | 805 @DomName('IDBObjectStore.deleteIndex') |
| 782 @DocsEditable() | 806 @DocsEditable() |
| 783 void deleteIndex(String name) => _blink.BlinkIDBObjectStore.$deleteIndex_Callb
ack(this, name); | 807 void deleteIndex(String name) => _blink.BlinkIDBObjectStore.$deleteIndex_Callb
ack(this, name); |
| 784 | 808 |
| 785 @DomName('IDBObjectStore.get') | 809 @DomName('IDBObjectStore.get') |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 | 1097 |
| 1074 @DomName('IDBVersionChangeEvent.newVersion') | 1098 @DomName('IDBVersionChangeEvent.newVersion') |
| 1075 @DocsEditable() | 1099 @DocsEditable() |
| 1076 Object get newVersion => _blink.BlinkIDBVersionChangeEvent.$newVersion_Getter(
this); | 1100 Object get newVersion => _blink.BlinkIDBVersionChangeEvent.$newVersion_Getter(
this); |
| 1077 | 1101 |
| 1078 @DomName('IDBVersionChangeEvent.oldVersion') | 1102 @DomName('IDBVersionChangeEvent.oldVersion') |
| 1079 @DocsEditable() | 1103 @DocsEditable() |
| 1080 Object get oldVersion => _blink.BlinkIDBVersionChangeEvent.$oldVersion_Getter(
this); | 1104 Object get oldVersion => _blink.BlinkIDBVersionChangeEvent.$oldVersion_Getter(
this); |
| 1081 | 1105 |
| 1082 } | 1106 } |
| OLD | NEW |