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

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

Issue 959993002: Dart: Removes name conflicts from generated bindings. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 b6dc4e3394f533b4eb4346c8b6fe838489767946..12d65bdf3897e080d68f7e84e30324f28f278540 100644
--- a/services/dart/test/pingpong_target/main.dart
+++ b/services/dart/test/pingpong_target/main.dart
@@ -9,27 +9,30 @@ import 'mojo:core';
import 'package:services/dart/test/pingpong_service.mojom.dart';
-class PingPongServiceImpl extends PingPongService {
+class PingPongServiceImpl implements PingPongService {
+ PingPongServiceStub _stub;
Application _application;
PingPongClientProxy _proxy;
PingPongServiceImpl(Application application, MojoMessagePipeEndpoint endpoint)
- : _application = application, super(endpoint) {
- super.delegate = this;
+ : _application = application {
+ _stub = new PingPongServiceStub.fromEndpoint(endpoint)
+ ..delegate = this
+ ..listen();
}
- void setClient(PingPongClientProxy proxy) {
+ void setClient(Proxy proxy) {
assert(_proxy == null);
- _proxy = proxy;
+ _proxy = new PingPongClientProxy(proxy);
}
void ping(int pingValue) => _proxy.pong(pingValue + 1);
void quit() {
if (_proxy != null) {
- _proxy.close();
+ PingPongClientProxyClose(_proxy);
}
- super.close();
+ _stub.close();
if (_application != null) {
_application.close();
}
@@ -40,7 +43,7 @@ class PingPongApplication extends Application {
PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle);
void acceptConnection(String requestorUrl, ApplicationConnection connection) {
- connection.provideService(PingPongService.name,
+ connection.provideService(PingPongServiceName,
(endpoint) => new PingPongServiceImpl(this, endpoint));
connection.listen();
}
@@ -49,6 +52,5 @@ class PingPongApplication extends Application {
main(List args) {
MojoHandle appHandle = new MojoHandle(args[0]);
String url = args[1];
- var pingPongApplication = new PingPongApplication.fromHandle(appHandle);
- pingPongApplication.listen();
+ new PingPongApplication.fromHandle(appHandle);
}

Powered by Google App Engine
This is Rietveld 408576698