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

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

Issue 878883002: Dart: Adjusts class Application for removal of Application/Shell Client= (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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.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.dart
diff --git a/services/dart/test/pingpong_target.dart b/services/dart/test/pingpong_target.dart
index 98f75870a86d88b2dbfa6dfeb19e5fbffad83f8a..ccc1aa44fdf6609c5cf070af7d24fad746b45f7a 100644
--- a/services/dart/test/pingpong_target.dart
+++ b/services/dart/test/pingpong_target.dart
@@ -12,9 +12,12 @@ import 'dart:mojo_core';
import 'package:services/dart/test/pingpong_service.mojom.dart';
class PingPongServiceImpl extends PingPongServiceStub {
+ Application _application;
PingPongClientProxy _proxy;
- PingPongServiceImpl(MojoMessagePipeEndpoint endpoint) : super(endpoint);
+ PingPongServiceImpl(MojoMessagePipeEndpoint endpoint, Application application)
+ : _application = application,
+ super(endpoint);
void setClient(PingPongClientProxy proxy) {
_proxy = proxy;
@@ -27,6 +30,9 @@ class PingPongServiceImpl extends PingPongServiceStub {
_proxy.close();
}
close();
+ if (_application != null) {
+ _application.close();
+ }
}
}
@@ -34,12 +40,12 @@ class PingPongApplication extends Application {
PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle);
Function stubFactoryClosure() =>
- (endpoint) => new PingPongServiceImpl(endpoint);
+ (endpoint) => new PingPongServiceImpl(endpoint, this);
}
main(List args) {
- MojoHandle shellHandle = new MojoHandle(args[0]);
+ MojoHandle appHandle = new MojoHandle(args[0]);
String url = args[1];
- var pingPongApplication = new PingPongApplication.fromHandle(shellHandle);
+ var pingPongApplication = new PingPongApplication.fromHandle(appHandle);
pingPongApplication.listen();
}
« no previous file with comments | « services/dart/test/pingpong.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698