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

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

Issue 23461018: Fixing Indexed DB from latest Blink roll (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
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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 bool autoAdvance}) { 571 bool autoAdvance}) {
572 var key_OR_range = null; 572 var key_OR_range = null;
573 if (key != null) { 573 if (key != null) {
574 if (range != null) { 574 if (range != null) {
575 throw new ArgumentError('Cannot specify both key and range.'); 575 throw new ArgumentError('Cannot specify both key and range.');
576 } 576 }
577 key_OR_range = key; 577 key_OR_range = key;
578 } else { 578 } else {
579 key_OR_range = range; 579 key_OR_range = range;
580 } 580 }
581 var request = _openCursor(key_OR_range, direction); 581 var request;
582 if (direction == null) {
583 request = _openCursor(key_OR_range);
584 } else {
585 request = _openCursor(key_OR_range, direction);
586 }
582 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 587 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
583 } 588 }
584 589
585 /** 590 /**
586 * Creates a stream of cursors over the records in this object store. 591 * Creates a stream of cursors over the records in this object store.
587 * 592 *
588 * See also: 593 * See also:
589 * 594 *
590 * * [ObjectStore.openCursor] 595 * * [ObjectStore.openCursor]
591 */ 596 */
592 Stream<Cursor> openKeyCursor({key, KeyRange range, String direction, 597 Stream<Cursor> openKeyCursor({key, KeyRange range, String direction,
593 bool autoAdvance}) { 598 bool autoAdvance}) {
594 var key_OR_range = null; 599 var key_OR_range = null;
595 if (key != null) { 600 if (key != null) {
596 if (range != null) { 601 if (range != null) {
597 throw new ArgumentError('Cannot specify both key and range.'); 602 throw new ArgumentError('Cannot specify both key and range.');
598 } 603 }
599 key_OR_range = key; 604 key_OR_range = key;
600 } else { 605 } else {
601 key_OR_range = range; 606 key_OR_range = range;
602 } 607 }
603 var request = _openKeyCursor(key_OR_range, direction); 608 var request;
609 if (direction == null) {
610 request = _openKeyCursor(key_OR_range);
611 } else {
612 request = _openKeyCursor(key_OR_range, direction);
613 }
604 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 614 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
605 } 615 }
606 616
607 617
608 @DomName('IDBIndex.keyPath') 618 @DomName('IDBIndex.keyPath')
609 @DocsEditable() 619 @DocsEditable()
610 @annotation_Creates_SerializedScriptValue 620 @annotation_Creates_SerializedScriptValue
611 final dynamic keyPath; 621 final dynamic keyPath;
612 622
613 @DomName('IDBIndex.multiEntry') 623 @DomName('IDBIndex.multiEntry')
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 @annotation_Creates_SerializedScriptValue 657 @annotation_Creates_SerializedScriptValue
648 @Creates('ObjectStore') 658 @Creates('ObjectStore')
649 Request _getKey(Object key) native; 659 Request _getKey(Object key) native;
650 660
651 @JSName('openCursor') 661 @JSName('openCursor')
652 @DomName('IDBIndex.openCursor') 662 @DomName('IDBIndex.openCursor')
653 @DocsEditable() 663 @DocsEditable()
654 @Returns('Request') 664 @Returns('Request')
655 @Creates('Request') 665 @Creates('Request')
656 @Creates('Cursor') 666 @Creates('Cursor')
657 Request _openCursor(Object key, String direction) native; 667 Request _openCursor(Object key, [String direction]) native;
658 668
659 @JSName('openKeyCursor') 669 @JSName('openKeyCursor')
660 @DomName('IDBIndex.openKeyCursor') 670 @DomName('IDBIndex.openKeyCursor')
661 @DocsEditable() 671 @DocsEditable()
662 @Returns('Request') 672 @Returns('Request')
663 @Creates('Request') 673 @Creates('Request')
664 @Creates('Cursor') 674 @Creates('Cursor')
665 Request _openKeyCursor(Object key, String direction) native; 675 Request _openKeyCursor(Object key, [String direction]) native;
666 676
667 } 677 }
668 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 678 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
669 // for details. All rights reserved. Use of this source code is governed by a 679 // for details. All rights reserved. Use of this source code is governed by a
670 // BSD-style license that can be found in the LICENSE file. 680 // BSD-style license that can be found in the LICENSE file.
671 681
672 682
673 @DomName('IDBKeyRange') 683 @DomName('IDBKeyRange')
674 @Unstable() 684 @Unstable()
675 class KeyRange extends Interceptor native "IDBKeyRange" { 685 class KeyRange extends Interceptor native "IDBKeyRange" {
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1259 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1250 // for details. All rights reserved. Use of this source code is governed by a 1260 // for details. All rights reserved. Use of this source code is governed by a
1251 // BSD-style license that can be found in the LICENSE file. 1261 // BSD-style license that can be found in the LICENSE file.
1252 1262
1253 1263
1254 @DocsEditable() 1264 @DocsEditable()
1255 @DomName('IDBAny') 1265 @DomName('IDBAny')
1256 @deprecated // nonstandard 1266 @deprecated // nonstandard
1257 abstract class _IDBAny extends Interceptor native "IDBAny" { 1267 abstract class _IDBAny extends Interceptor native "IDBAny" {
1258 } 1268 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | tests/html/html.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698