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

Unified Diff: runtime/bin/socket_impl.dart

Issue 8386029: Consistently use setters to set event handlers in native APIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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.dart ('k') | runtime/bin/socket_stream.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_impl.dart
diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart
index deee66a5119c27be51cc88d60fd3c03b63176da8..31e2ceee973f9da736387a7aba2fc897689ba3b6 100644
--- a/runtime/bin/socket_impl.dart
+++ b/runtime/bin/socket_impl.dart
@@ -76,7 +76,7 @@ class _SocketBase {
void _getPort() native "Socket_GetPort";
- void setErrorHandler(void callback()) {
+ void set errorHandler(void callback()) {
_setHandler(_ERROR_EVENT, callback);
}
@@ -185,7 +185,7 @@ class _ServerSocket extends _SocketBase implements ServerSocket {
bool _createBindListen(String bindAddress, int port, int backlog)
native "ServerSocket_CreateBindListen";
- void setConnectionHandler(void callback()) {
+ void set connectionHandler(void callback()) {
_setHandler(_IN_EVENT, callback);
}
@@ -269,19 +269,19 @@ class _Socket extends _SocketBase implements Socket {
bool _createConnect(String host, int port) native "Socket_CreateConnect";
- void setWriteHandler(void callback()) {
+ void set writeHandler(void callback()) {
_setHandler(_OUT_EVENT, callback);
}
- void setConnectHandler(void callback()) {
+ void set connectHandler(void callback()) {
_setHandler(_OUT_EVENT, callback);
}
- void setDataHandler(void callback()) {
+ void set dataHandler(void callback()) {
_setHandler(_IN_EVENT, callback);
}
- void setCloseHandler(void callback()) {
+ void set closeHandler(void callback()) {
_setHandler(_CLOSE_EVENT, callback);
}
« no previous file with comments | « runtime/bin/socket.dart ('k') | runtime/bin/socket_stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698