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

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

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