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

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

Issue 23523008: Missed one template from the previous CL to unbreak indexed_db. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:typed_data'; 6 import 'dart:typed_data';
7 import 'dart:_js_helper' show Creates, Returns, JSName, Null; 7 import 'dart:_js_helper' show Creates, Returns, JSName, Null;
8 import 'dart:_foreign_helper' show JS; 8 import 'dart:_foreign_helper' show JS;
9 import 'dart:_interceptors' show Interceptor, JSExtendableArray; 9 import 'dart:_interceptors' show Interceptor, JSExtendableArray;
10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 // for details. All rights reserved. Use of this source code is governed by a 524 // for details. All rights reserved. Use of this source code is governed by a
525 // BSD-style license that can be found in the LICENSE file. 525 // BSD-style license that can be found in the LICENSE file.
526 526
527 527
528 @DomName('IDBIndex') 528 @DomName('IDBIndex')
529 @Unstable() 529 @Unstable()
530 class Index extends Interceptor native "IDBIndex" { 530 class Index extends Interceptor native "IDBIndex" {
531 @DomName('IDBIndex.count') 531 @DomName('IDBIndex.count')
532 Future<int> count([key_OR_range]) { 532 Future<int> count([key_OR_range]) {
533 try { 533 try {
534 var request; 534 var request = _count(key_OR_range);
535 if (key_OR_range != null) {
536 request = _count(key_OR_range);
537 } else {
538 request = _count();
539 }
540 return _completeRequest(request); 535 return _completeRequest(request);
541 } catch (e, stacktrace) { 536 } catch (e, stacktrace) {
542 return new Future.error(e, stacktrace); 537 return new Future.error(e, stacktrace);
543 } 538 }
544 } 539 }
545 540
546 @DomName('IDBIndex.get') 541 @DomName('IDBIndex.get')
547 Future get(key) { 542 Future get(key) {
548 try { 543 try {
549 var request = _get(key); 544 var request = _get(key);
(...skipping 26 matching lines...) Expand all
576 bool autoAdvance}) { 571 bool autoAdvance}) {
577 var key_OR_range = null; 572 var key_OR_range = null;
578 if (key != null) { 573 if (key != null) {
579 if (range != null) { 574 if (range != null) {
580 throw new ArgumentError('Cannot specify both key and range.'); 575 throw new ArgumentError('Cannot specify both key and range.');
581 } 576 }
582 key_OR_range = key; 577 key_OR_range = key;
583 } else { 578 } else {
584 key_OR_range = range; 579 key_OR_range = range;
585 } 580 }
586 var request; 581 var request = _openCursor(key_OR_range, direction);
587 if (direction == null) {
588 request = _openCursor(key_OR_range);
589 } else {
590 request = _openCursor(key_OR_range, direction);
591 }
592 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 582 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
593 } 583 }
594 584
595 /** 585 /**
596 * Creates a stream of cursors over the records in this object store. 586 * Creates a stream of cursors over the records in this object store.
597 * 587 *
598 * See also: 588 * See also:
599 * 589 *
600 * * [ObjectStore.openCursor] 590 * * [ObjectStore.openCursor]
601 */ 591 */
602 Stream<Cursor> openKeyCursor({key, KeyRange range, String direction, 592 Stream<Cursor> openKeyCursor({key, KeyRange range, String direction,
603 bool autoAdvance}) { 593 bool autoAdvance}) {
604 var key_OR_range = null; 594 var key_OR_range = null;
605 if (key != null) { 595 if (key != null) {
606 if (range != null) { 596 if (range != null) {
607 throw new ArgumentError('Cannot specify both key and range.'); 597 throw new ArgumentError('Cannot specify both key and range.');
608 } 598 }
609 key_OR_range = key; 599 key_OR_range = key;
610 } else { 600 } else {
611 key_OR_range = range; 601 key_OR_range = range;
612 } 602 }
613 var request; 603 var request = _openKeyCursor(key_OR_range, direction);
614 if (direction == null) {
615 request = _openKeyCursor(key_OR_range);
616 } else {
617 request = _openKeyCursor(key_OR_range, direction);
618 }
619 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 604 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
620 } 605 }
621 606
622 607
623 @DomName('IDBIndex.keyPath') 608 @DomName('IDBIndex.keyPath')
624 @DocsEditable() 609 @DocsEditable()
625 @annotation_Creates_SerializedScriptValue 610 @annotation_Creates_SerializedScriptValue
626 final dynamic keyPath; 611 final dynamic keyPath;
627 612
628 @DomName('IDBIndex.multiEntry') 613 @DomName('IDBIndex.multiEntry')
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 try { 769 try {
785 return _completeRequest(_delete(key_OR_keyRange)); 770 return _completeRequest(_delete(key_OR_keyRange));
786 } catch (e, stacktrace) { 771 } catch (e, stacktrace) {
787 return new Future.error(e, stacktrace); 772 return new Future.error(e, stacktrace);
788 } 773 }
789 } 774 }
790 775
791 @DomName('IDBObjectStore.count') 776 @DomName('IDBObjectStore.count')
792 Future<int> count([key_OR_range]) { 777 Future<int> count([key_OR_range]) {
793 try { 778 try {
794 var request; 779 var request = _count(key_OR_range);
795 if (key_OR_range != null) {
796 request = _count(key_OR_range);
797 } else {
798 request = _count();
799 }
800 return _completeRequest(request); 780 return _completeRequest(request);
801 } catch (e, stacktrace) { 781 } catch (e, stacktrace) {
802 return new Future.error(e, stacktrace); 782 return new Future.error(e, stacktrace);
803 } 783 }
804 } 784 }
805 785
806 @DomName('IDBObjectStore.put') 786 @DomName('IDBObjectStore.put')
807 Future put(value, [key]) { 787 Future put(value, [key]) {
808 try { 788 try {
809 var request; 789 var request;
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1249 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1270 // for details. All rights reserved. Use of this source code is governed by a 1250 // for details. All rights reserved. Use of this source code is governed by a
1271 // BSD-style license that can be found in the LICENSE file. 1251 // BSD-style license that can be found in the LICENSE file.
1272 1252
1273 1253
1274 @DocsEditable() 1254 @DocsEditable()
1275 @DomName('IDBAny') 1255 @DomName('IDBAny')
1276 @deprecated // nonstandard 1256 @deprecated // nonstandard
1277 abstract class _IDBAny extends Interceptor native "IDBAny" { 1257 abstract class _IDBAny extends Interceptor native "IDBAny" {
1278 } 1258 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698