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

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

Issue 9500002: Rename blahHandler to onBlah throughout dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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 | « runtime/bin/input_stream.dart ('k') | runtime/bin/output_stream.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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 void close() { 67 void close() {
68 if (_streamMarkedClosed) throw new StreamException.streamClosed(); 68 if (_streamMarkedClosed) throw new StreamException.streamClosed();
69 _streamMarkedClosed = true; 69 _streamMarkedClosed = true;
70 } 70 }
71 71
72 void destroy() { 72 void destroy() {
73 close(); 73 close();
74 } 74 }
75 75
76 void set noPendingWriteHandler(void callback()) { 76 void set onNoPendingWrites(void callback()) {
77 _clientNoPendingWriteHandler = callback; 77 _clientNoPendingWriteHandler = callback;
78 _checkScheduleCallbacks(); 78 _checkScheduleCallbacks();
79 } 79 }
80 80
81 void set closeHandler(void callback()) { 81 void set onClosed(void callback()) {
82 _clientCloseHandler = callback; 82 _clientCloseHandler = callback;
83 } 83 }
84 84
85 void set errorHandler(void callback()) { 85 void set onError(void callback()) {
86 // No errors emitted. 86 // No errors emitted.
87 } 87 }
88 88
89 void _checkScheduleCallbacks() { 89 void _checkScheduleCallbacks() {
90 void issueNoPendingWriteCallback(Timer timer) { 90 void issueNoPendingWriteCallback(Timer timer) {
91 _scheduledNoPendingWriteCallback = null; 91 _scheduledNoPendingWriteCallback = null;
92 if (_clientNoPendingWriteHandler !== null) { 92 if (_clientNoPendingWriteHandler !== null) {
93 _clientNoPendingWriteHandler(); 93 _clientNoPendingWriteHandler();
94 _checkScheduleCallbacks(); 94 _checkScheduleCallbacks();
95 } 95 }
(...skipping 25 matching lines...) Expand all
121 } 121 }
122 122
123 _BufferList _bufferList; 123 _BufferList _bufferList;
124 bool _streamMarkedClosed = false; 124 bool _streamMarkedClosed = false;
125 bool _closeCallbackCalled = false; 125 bool _closeCallbackCalled = false;
126 Timer _scheduledNoPendingWriteCallback; 126 Timer _scheduledNoPendingWriteCallback;
127 Timer _scheduledCloseCallback; 127 Timer _scheduledCloseCallback;
128 Function _clientNoPendingWriteHandler; 128 Function _clientNoPendingWriteHandler;
129 Function _clientCloseHandler; 129 Function _clientCloseHandler;
130 } 130 }
OLDNEW
« no previous file with comments | « runtime/bin/input_stream.dart ('k') | runtime/bin/output_stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698