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

Unified Diff: services/dart/test/pingpong_target/main.dart

Issue 982673002: Dart: Removes need to call listen(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Don't pile up callbacks Created 5 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
Index: services/dart/test/pingpong_target/main.dart
diff --git a/services/dart/test/pingpong_target/main.dart b/services/dart/test/pingpong_target/main.dart
index a85e4a7b47cad98045376bed8a6fac76ac868411..356c8d5d1adb17d25256331ea800aba2f4fc36b5 100644
--- a/services/dart/test/pingpong_target/main.dart
+++ b/services/dart/test/pingpong_target/main.dart
@@ -14,9 +14,8 @@ class PingPongServiceImpl implements PingPongService {
Application _application;
PingPongClientProxy _pingPongClient;
- PingPongServiceImpl(Application application, MojoMessagePipeEndpoint endpoint)
- : _application = application {
- _stub = new PingPongServiceStub.fromEndpoint(endpoint, impl: this);
+ PingPongServiceImpl(this._application, MojoMessagePipeEndpoint endpoint) {
+ _stub = new PingPongServiceStub.fromEndpoint(endpoint, this);
}
void setClient(ProxyBase proxyBase) {
@@ -45,7 +44,7 @@ class PingPongApplication extends Application {
PingPongServiceName,
(endpoint) => new PingPongServiceImpl(this, endpoint));
// Close the application when the first connection goes down.
- connection.listen(onClosed: close);
+ connection.onError = close;
}
}
« mojo/public/dart/src/event_stream.dart ('K') | « services/dart/test/pingpong/main.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698