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

Side by Side Diff: tools/dom/templates/html/impl/impl_IDBIndex.darttemplate

Issue 589253002: Revert "Chrome 38 script changes from integration branch" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { 7 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
8 @DomName('IDBIndex.count') 8 @DomName('IDBIndex.count')
9 Future<int> count([key_OR_range]) { 9 Future<int> count([key_OR_range]) {
10 try { 10 try {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (key != null) { 50 if (key != null) {
51 if (range != null) { 51 if (range != null) {
52 throw new ArgumentError('Cannot specify both key and range.'); 52 throw new ArgumentError('Cannot specify both key and range.');
53 } 53 }
54 key_OR_range = key; 54 key_OR_range = key;
55 } else { 55 } else {
56 key_OR_range = range; 56 key_OR_range = range;
57 } 57 }
58 var request; 58 var request;
59 if (direction == null) { 59 if (direction == null) {
60 // FIXME: Passing in "next" should be unnecessary. 60 request = _openCursor(key_OR_range);
61 request = _openCursor(key_OR_range, "next");
62 } else { 61 } else {
63 request = _openCursor(key_OR_range, direction); 62 request = _openCursor(key_OR_range, direction);
64 } 63 }
65 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 64 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
66 } 65 }
67 66
68 /** 67 /**
69 * Creates a stream of cursors over the records in this object store. 68 * Creates a stream of cursors over the records in this object store.
70 * 69 *
71 * See also: 70 * See also:
72 * 71 *
73 * * [ObjectStore.openCursor] 72 * * [ObjectStore.openCursor]
74 */ 73 */
75 Stream<Cursor> openKeyCursor({key, KeyRange range, String direction, 74 Stream<Cursor> openKeyCursor({key, KeyRange range, String direction,
76 bool autoAdvance}) { 75 bool autoAdvance}) {
77 var key_OR_range = null; 76 var key_OR_range = null;
78 if (key != null) { 77 if (key != null) {
79 if (range != null) { 78 if (range != null) {
80 throw new ArgumentError('Cannot specify both key and range.'); 79 throw new ArgumentError('Cannot specify both key and range.');
81 } 80 }
82 key_OR_range = key; 81 key_OR_range = key;
83 } else { 82 } else {
84 key_OR_range = range; 83 key_OR_range = range;
85 } 84 }
86 var request; 85 var request;
87 if (direction == null) { 86 if (direction == null) {
88 // FIXME: Passing in "next" should be unnecessary. 87 request = _openKeyCursor(key_OR_range);
89 request = _openKeyCursor(key_OR_range, "next");
90 } else { 88 } else {
91 request = _openKeyCursor(key_OR_range, direction); 89 request = _openKeyCursor(key_OR_range, direction);
92 } 90 }
93 return ObjectStore._cursorStreamFromResult(request, autoAdvance); 91 return ObjectStore._cursorStreamFromResult(request, autoAdvance);
94 } 92 }
95 93
96 $!MEMBERS 94 $!MEMBERS
97 } 95 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate ('k') | tools/dom/templates/html/impl/impl_Touch.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698