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

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: Merge and Format Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/dart/test/pingpong/main.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a91d04022112b579c4f05582826594c4785e18bd 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) {
@@ -41,11 +40,10 @@ class PingPongApplication extends Application {
@override
void acceptConnection(String requestorUrl, String resolvedUrl,
ApplicationConnection connection) {
- connection.provideService(
- PingPongServiceName,
+ connection.provideService(PingPongServiceName,
(endpoint) => new PingPongServiceImpl(this, endpoint));
// Close the application when the first connection goes down.
- connection.listen(onClosed: close);
+ connection.onError = close;
}
}
« no previous file with comments | « services/dart/test/pingpong/main.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698