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

Side by Side Diff: runtime/bin/list_stream_impl.dart

Issue 11090016: Change core lib, dart2js, and more for new optional parameters syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« no previous file with comments | « runtime/bin/http_utils.dart ('k') | runtime/bin/socket_stream_impl.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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Default implementation of [ListInputStream]. 6 * Default implementation of [ListInputStream].
7 */ 7 */
8 class _ListInputStream extends _BaseDataInputStream implements ListInputStream { 8 class _ListInputStream extends _BaseDataInputStream implements ListInputStream {
9 _ListInputStream() : _bufferList = new _BufferList(); 9 _ListInputStream() : _bufferList = new _BufferList();
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } else { 54 } else {
55 _bufferList.add(buffer); 55 _bufferList.add(buffer);
56 } 56 }
57 _checkScheduleCallbacks(); 57 _checkScheduleCallbacks();
58 return true; 58 return true;
59 } 59 }
60 60
61 bool writeFrom(List<int> buffer, [int offset = 0, int len]) { 61 bool writeFrom(List<int> buffer, [int offset = 0, int len]) {
62 return write( 62 return write(
63 buffer.getRange(offset, (len == null) ? buffer.length - offset : len), 63 buffer.getRange(offset, (len == null) ? buffer.length - offset : len),
64 copyBuffer: false); 64 false);
65 } 65 }
66 66
67 void flush() { 67 void flush() {
68 // Nothing to do on a list output stream. 68 // Nothing to do on a list output stream.
69 } 69 }
70 70
71 void close() { 71 void close() {
72 if (_streamMarkedClosed) throw new StreamException.streamClosed(); 72 if (_streamMarkedClosed) throw new StreamException.streamClosed();
73 _streamMarkedClosed = true; 73 _streamMarkedClosed = true;
74 _checkScheduleCallbacks(); 74 _checkScheduleCallbacks();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 _BufferList _bufferList; 150 _BufferList _bufferList;
151 bool _streamMarkedClosed = false; 151 bool _streamMarkedClosed = false;
152 bool _closeCallbackCalled = false; 152 bool _closeCallbackCalled = false;
153 Timer _scheduledDataCallback; 153 Timer _scheduledDataCallback;
154 Timer _scheduledNoPendingWriteCallback; 154 Timer _scheduledNoPendingWriteCallback;
155 Timer _scheduledCloseCallback; 155 Timer _scheduledCloseCallback;
156 Function _clientDataHandler; 156 Function _clientDataHandler;
157 Function _clientNoPendingWriteHandler; 157 Function _clientNoPendingWriteHandler;
158 Function _clientCloseHandler; 158 Function _clientCloseHandler;
159 } 159 }
OLDNEW
« no previous file with comments | « runtime/bin/http_utils.dart ('k') | runtime/bin/socket_stream_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698