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

Unified Diff: runtime/bin/stream_util.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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/socket_stream_impl.dart ('k') | runtime/bin/string_stream.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/stream_util.dart
diff --git a/runtime/bin/stream_util.dart b/runtime/bin/stream_util.dart
index 03efc36ebd6252988612bfe8ec94e45e9ab7a032..9c27c2b9420ec208a6d52b99b0a35e60a2bfbe9a 100644
--- a/runtime/bin/stream_util.dart
+++ b/runtime/bin/stream_util.dart
@@ -43,17 +43,17 @@ class _BaseDataInputStream {
bool get closed() => _closeCallbackCalled;
- void set dataHandler(void callback()) {
+ void set onData(void callback()) {
_clientDataHandler = callback;
_checkScheduleCallbacks();
}
- void set closeHandler(void callback()) {
+ void set onClosed(void callback()) {
_clientCloseHandler = callback;
_checkScheduleCallbacks();
}
- void set errorHandler(void callback()) {
+ void set onError(void callback()) {
_clientErrorHandler = callback;
}
@@ -150,8 +150,8 @@ void _pipe(InputStream input, OutputStream output, [bool close]) {
List<int> data;
while ((data = input.read()) !== null) {
if (!output.write(data)) {
- input.dataHandler = null;
- output.noPendingWriteHandler = pipeNoPendingWriteHandler;
+ input.onData = null;
+ output.onNoPendingWrites = pipeNoPendingWriteHandler;
break;
}
}
@@ -165,13 +165,13 @@ void _pipe(InputStream input, OutputStream output, [bool close]) {
};
pipeNoPendingWriteHandler = () {
- input.dataHandler = pipeDataHandler;
- output.noPendingWriteHandler = null;
+ input.onData = pipeDataHandler;
+ output.onNoPendingWrites = null;
};
_inputCloseHandler = input._clientCloseHandler;
- input.dataHandler = pipeDataHandler;
- input.closeHandler = pipeCloseHandler;
- output.noPendingWriteHandler = null;
+ input.onData = pipeDataHandler;
+ input.onClosed = pipeCloseHandler;
+ output.onNoPendingWrites = null;
}
« no previous file with comments | « runtime/bin/socket_stream_impl.dart ('k') | runtime/bin/string_stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698