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

Side by Side Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 12180023: "Reverting 18090" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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:_js_helper' show Creates, Returns, JSName, Null; 6 import 'dart:_js_helper' show Creates, Returns, JSName, Null;
7 import 'dart:_foreign_helper' show JS; 7 import 'dart:_foreign_helper' show JS;
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 @JSName('continue') 164 @JSName('continue')
165 @DomName('IDBCursor.continue') 165 @DomName('IDBCursor.continue')
166 @DocsEditable 166 @DocsEditable
167 void continueFunction([Object key]) native; 167 void continueFunction([Object key]) native;
168 168
169 @DomName('IDBCursor.delete') 169 @DomName('IDBCursor.delete')
170 @DocsEditable 170 @DocsEditable
171 Request delete() native; 171 Request delete() native;
172 172
173 @DomName('IDBCursor.update')
174 @DocsEditable
175 Request update(/*any*/ value) { 173 Request update(/*any*/ value) {
176 var value_1 = convertDartToNative_SerializedScriptValue(value); 174 var value_1 = convertDartToNative_SerializedScriptValue(value);
177 return _update_1(value_1); 175 return _update_1(value_1);
178 } 176 }
179 @JSName('update') 177 @JSName('update')
180 @DomName('IDBCursor.update') 178 @DomName('IDBCursor.update')
181 @DocsEditable 179 @DocsEditable
182 Request _update_1(value) native; 180 Request _update_1(value) native;
183 } 181 }
184 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 182 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 258
261 @JSName('addEventListener') 259 @JSName('addEventListener')
262 @DomName('IDBDatabase.addEventListener') 260 @DomName('IDBDatabase.addEventListener')
263 @DocsEditable 261 @DocsEditable
264 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native; 262 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native;
265 263
266 @DomName('IDBDatabase.close') 264 @DomName('IDBDatabase.close')
267 @DocsEditable 265 @DocsEditable
268 void close() native; 266 void close() native;
269 267
270 @DomName('IDBDatabase.createObjectStore')
271 @DocsEditable
272 ObjectStore createObjectStore(String name, [Map options]) { 268 ObjectStore createObjectStore(String name, [Map options]) {
273 if (?options) { 269 if (?options) {
274 var options_1 = convertDartToNative_Dictionary(options); 270 var options_1 = convertDartToNative_Dictionary(options);
275 return _createObjectStore_1(name, options_1); 271 return _createObjectStore_1(name, options_1);
276 } 272 }
277 return _createObjectStore_2(name); 273 return _createObjectStore_2(name);
278 } 274 }
279 @JSName('createObjectStore') 275 @JSName('createObjectStore')
280 @DomName('IDBDatabase.createObjectStore') 276 @DomName('IDBDatabase.createObjectStore')
281 @DocsEditable 277 @DocsEditable
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 @DocsEditable 352 @DocsEditable
357 VersionChangeRequest deleteDatabase(String name) native; 353 VersionChangeRequest deleteDatabase(String name) native;
358 354
359 @DomName('IDBFactory.open') 355 @DomName('IDBFactory.open')
360 @DocsEditable 356 @DocsEditable
361 @Returns('Request') 357 @Returns('Request')
362 @Creates('Request') 358 @Creates('Request')
363 @Creates('Database') 359 @Creates('Database')
364 OpenDBRequest open(String name, [int version]) native; 360 OpenDBRequest open(String name, [int version]) native;
365 361
366 @JSName('webkitGetDatabaseNames')
367 @DomName('IDBFactory.webkitGetDatabaseNames') 362 @DomName('IDBFactory.webkitGetDatabaseNames')
368 @DocsEditable 363 @DocsEditable
369 @SupportedBrowser(SupportedBrowser.CHROME) 364 Request webkitGetDatabaseNames() native;
370 @SupportedBrowser(SupportedBrowser.SAFARI)
371 @Experimental
372 Request getDatabaseNames() native;
373 365
374 } 366 }
375 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 367 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
376 // for details. All rights reserved. Use of this source code is governed by a 368 // for details. All rights reserved. Use of this source code is governed by a
377 // BSD-style license that can be found in the LICENSE file. 369 // BSD-style license that can be found in the LICENSE file.
378 370
379 371
380 @DocsEditable 372 @DocsEditable
381 @DomName('IDBIndex') 373 @DomName('IDBIndex')
382 class Index native "*IDBIndex" { 374 class Index native "*IDBIndex" {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 final dynamic keyPath; 513 final dynamic keyPath;
522 514
523 @DomName('IDBObjectStore.name') 515 @DomName('IDBObjectStore.name')
524 @DocsEditable 516 @DocsEditable
525 final String name; 517 final String name;
526 518
527 @DomName('IDBObjectStore.transaction') 519 @DomName('IDBObjectStore.transaction')
528 @DocsEditable 520 @DocsEditable
529 final Transaction transaction; 521 final Transaction transaction;
530 522
531 @DomName('IDBObjectStore.add')
532 @DocsEditable
533 @Returns('Request')
534 @Creates('Request')
535 @_annotation_Creates_IDBKey
536 Request add(/*any*/ value, [/*any*/ key]) { 523 Request add(/*any*/ value, [/*any*/ key]) {
537 if (?key) { 524 if (?key) {
538 var value_1 = convertDartToNative_SerializedScriptValue(value); 525 var value_1 = convertDartToNative_SerializedScriptValue(value);
539 var key_2 = convertDartToNative_SerializedScriptValue(key); 526 var key_2 = convertDartToNative_SerializedScriptValue(key);
540 return _add_1(value_1, key_2); 527 return _add_1(value_1, key_2);
541 } 528 }
542 var value_3 = convertDartToNative_SerializedScriptValue(value); 529 var value_3 = convertDartToNative_SerializedScriptValue(value);
543 return _add_2(value_3); 530 return _add_2(value_3);
544 } 531 }
545 @JSName('add') 532 @JSName('add')
(...skipping 12 matching lines...) Expand all
558 Request _add_2(value) native; 545 Request _add_2(value) native;
559 546
560 @DomName('IDBObjectStore.clear') 547 @DomName('IDBObjectStore.clear')
561 @DocsEditable 548 @DocsEditable
562 Request clear() native; 549 Request clear() native;
563 550
564 @DomName('IDBObjectStore.count') 551 @DomName('IDBObjectStore.count')
565 @DocsEditable 552 @DocsEditable
566 Request count([key_OR_range]) native; 553 Request count([key_OR_range]) native;
567 554
568 @DomName('IDBObjectStore.createIndex')
569 @DocsEditable
570 Index createIndex(String name, keyPath, [Map options]) { 555 Index createIndex(String name, keyPath, [Map options]) {
571 if ((keyPath is List<String> || keyPath == null) && !?options) { 556 if ((keyPath is List<String> || keyPath == null) && !?options) {
572 return _createIndex_1(name, keyPath); 557 return _createIndex_1(name, keyPath);
573 } 558 }
574 if ((keyPath is List<String> || keyPath == null)) { 559 if ((keyPath is List<String> || keyPath == null)) {
575 var options_1 = convertDartToNative_Dictionary(options); 560 var options_1 = convertDartToNative_Dictionary(options);
576 return _createIndex_2(name, keyPath, options_1); 561 return _createIndex_2(name, keyPath, options_1);
577 } 562 }
578 if ((keyPath is String || keyPath == null) && !?options) { 563 if ((keyPath is String || keyPath == null) && !?options) {
579 return _createIndex_3(name, keyPath); 564 return _createIndex_3(name, keyPath);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 @DocsEditable 606 @DocsEditable
622 Index index(String name) native; 607 Index index(String name) native;
623 608
624 @DomName('IDBObjectStore.openCursor') 609 @DomName('IDBObjectStore.openCursor')
625 @DocsEditable 610 @DocsEditable
626 @Returns('Request') 611 @Returns('Request')
627 @Creates('Request') 612 @Creates('Request')
628 @Creates('Cursor') 613 @Creates('Cursor')
629 Request openCursor([key_OR_range, String direction]) native; 614 Request openCursor([key_OR_range, String direction]) native;
630 615
631 @DomName('IDBObjectStore.put')
632 @DocsEditable
633 @Returns('Request')
634 @Creates('Request')
635 @_annotation_Creates_IDBKey
636 Request put(/*any*/ value, [/*any*/ key]) { 616 Request put(/*any*/ value, [/*any*/ key]) {
637 if (?key) { 617 if (?key) {
638 var value_1 = convertDartToNative_SerializedScriptValue(value); 618 var value_1 = convertDartToNative_SerializedScriptValue(value);
639 var key_2 = convertDartToNative_SerializedScriptValue(key); 619 var key_2 = convertDartToNative_SerializedScriptValue(key);
640 return _put_1(value_1, key_2); 620 return _put_1(value_1, key_2);
641 } 621 }
642 var value_3 = convertDartToNative_SerializedScriptValue(value); 622 var value_3 = convertDartToNative_SerializedScriptValue(value);
643 return _put_2(value_3); 623 return _put_2(value_3);
644 } 624 }
645 @JSName('put') 625 @JSName('put')
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 721
742 @DomName('IDBRequest.source') 722 @DomName('IDBRequest.source')
743 @DocsEditable 723 @DocsEditable
744 @Creates('Null') 724 @Creates('Null')
745 final dynamic source; 725 final dynamic source;
746 726
747 @DomName('IDBRequest.transaction') 727 @DomName('IDBRequest.transaction')
748 @DocsEditable 728 @DocsEditable
749 final Transaction transaction; 729 final Transaction transaction;
750 730
751 @JSName('webkitErrorMessage')
752 @DomName('IDBRequest.webkitErrorMessage') 731 @DomName('IDBRequest.webkitErrorMessage')
753 @DocsEditable 732 @DocsEditable
754 @SupportedBrowser(SupportedBrowser.CHROME) 733 final String webkitErrorMessage;
755 @SupportedBrowser(SupportedBrowser.SAFARI)
756 @Experimental
757 final String errorMessage;
758 734
759 @JSName('addEventListener') 735 @JSName('addEventListener')
760 @DomName('IDBRequest.addEventListener') 736 @DomName('IDBRequest.addEventListener')
761 @DocsEditable 737 @DocsEditable
762 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native; 738 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native;
763 739
764 @DomName('IDBRequest.dispatchEvent') 740 @DomName('IDBRequest.dispatchEvent')
765 @DocsEditable 741 @DocsEditable
766 bool dispatchEvent(Event evt) native; 742 bool dispatchEvent(Event evt) native;
767 743
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 final Database db; 799 final Database db;
824 800
825 @DomName('IDBTransaction.error') 801 @DomName('IDBTransaction.error')
826 @DocsEditable 802 @DocsEditable
827 final DomError error; 803 final DomError error;
828 804
829 @DomName('IDBTransaction.mode') 805 @DomName('IDBTransaction.mode')
830 @DocsEditable 806 @DocsEditable
831 final String mode; 807 final String mode;
832 808
833 @JSName('webkitErrorMessage')
834 @DomName('IDBTransaction.webkitErrorMessage') 809 @DomName('IDBTransaction.webkitErrorMessage')
835 @DocsEditable 810 @DocsEditable
836 @SupportedBrowser(SupportedBrowser.CHROME) 811 final String webkitErrorMessage;
837 @SupportedBrowser(SupportedBrowser.SAFARI)
838 @Experimental
839 final String errorMessage;
840 812
841 @DomName('IDBTransaction.abort') 813 @DomName('IDBTransaction.abort')
842 @DocsEditable 814 @DocsEditable
843 void abort() native; 815 void abort() native;
844 816
845 @JSName('addEventListener') 817 @JSName('addEventListener')
846 @DomName('IDBTransaction.addEventListener') 818 @DomName('IDBTransaction.addEventListener')
847 @DocsEditable 819 @DocsEditable
848 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native; 820 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native;
849 821
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 } 925 }
954 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 926 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
955 // for details. All rights reserved. Use of this source code is governed by a 927 // for details. All rights reserved. Use of this source code is governed by a
956 // BSD-style license that can be found in the LICENSE file. 928 // BSD-style license that can be found in the LICENSE file.
957 929
958 930
959 @DocsEditable 931 @DocsEditable
960 @DomName('IDBAny') 932 @DomName('IDBAny')
961 class _IDBAny native "*IDBAny" { 933 class _IDBAny native "*IDBAny" {
962 } 934 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698