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

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

Issue 9864051: Fix typo that has crept into string input stream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | tests/standalone/src/io/StringStreamTest.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 // Interface for decoders decoding binary data into string data. The 5 // Interface for decoders decoding binary data into string data. The
6 // decoder keeps track of line breaks during decoding. 6 // decoder keeps track of line breaks during decoding.
7 interface _StringDecoder { 7 interface _StringDecoder {
8 // Add more binary data to be decoded. The ownership of the buffer 8 // Add more binary data to be decoded. The ownership of the buffer
9 // is transfered to the decoder and the caller most not modify it any more. 9 // is transfered to the decoder and the caller most not modify it any more.
10 int write(List<int> buffer); 10 int write(List<int> buffer);
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 _clientDataHandler = null; 388 _clientDataHandler = null;
389 _checkInstallDataHandler(); 389 _checkInstallDataHandler();
390 _checkScheduleCallback(); 390 _checkScheduleCallback();
391 } 391 }
392 392
393 void set onClosed(void callback()) { 393 void set onClosed(void callback()) {
394 _clientCloseHandler = callback; 394 _clientCloseHandler = callback;
395 } 395 }
396 396
397 void set onError(void callback(Exception e)) { 397 void set onError(void callback(Exception e)) {
398 _input.errorHandler = callback; 398 _input.onError = callback;
399 } 399 }
400 400
401 void _onData() { 401 void _onData() {
402 _readData(); 402 _readData();
403 if (!_decoder.isEmpty() && _clientDataHandler !== null) { 403 if (!_decoder.isEmpty() && _clientDataHandler !== null) {
404 _clientDataHandler(); 404 _clientDataHandler();
405 } 405 }
406 if (_decoder.lineBreaks > 0 && _clientLineHandler !== null) { 406 if (_decoder.lineBreaks > 0 && _clientLineHandler !== null) {
407 _clientLineHandler(); 407 _clientLineHandler();
408 } 408 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 bool _inputClosed = false; // Is the underlying input stream closed? 510 bool _inputClosed = false; // Is the underlying input stream closed?
511 bool _closed = false; // Is this stream closed. 511 bool _closed = false; // Is this stream closed.
512 bool _eof = false; // Has all data been read from the decoder? 512 bool _eof = false; // Has all data been read from the decoder?
513 Timer _scheduledDataCallback; 513 Timer _scheduledDataCallback;
514 Timer _scheduledLineCallback; 514 Timer _scheduledLineCallback;
515 Timer _scheduledCloseCallback; 515 Timer _scheduledCloseCallback;
516 Function _clientDataHandler; 516 Function _clientDataHandler;
517 Function _clientLineHandler; 517 Function _clientLineHandler;
518 Function _clientCloseHandler; 518 Function _clientCloseHandler;
519 } 519 }
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/src/io/StringStreamTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698