| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'mojo:application'; | 6 import 'mojo:application'; |
| 7 import 'mojo:bindings'; | 7 import 'mojo:bindings'; |
| 8 import 'mojo:core'; | 8 import 'mojo:core'; |
| 9 | 9 |
| 10 import 'package:services/dart/test/pingpong_service.mojom.dart'; | 10 import 'package:services/dart/test/pingpong_service.mojom.dart'; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 _stub.close(); | 107 _stub.close(); |
| 108 if (_application != null) { | 108 if (_application != null) { |
| 109 _application.close(); | 109 _application.close(); |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 | 113 |
| 114 class PingPongApplication extends Application { | 114 class PingPongApplication extends Application { |
| 115 PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle); | 115 PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle); |
| 116 | 116 |
| 117 void acceptConnection(String requestorUrl, ApplicationConnection connection) { | 117 @override |
| 118 void acceptConnection(String requestorUrl, String resolvedUrl, |
| 119 ApplicationConnection connection) { |
| 118 connection.provideService(PingPongServiceName, | 120 connection.provideService(PingPongServiceName, |
| 119 (endpoint) => new PingPongServiceImpl(this, endpoint)); | 121 (endpoint) => new PingPongServiceImpl(this, endpoint)); |
| 120 connection.listen(); | 122 connection.listen(); |
| 121 } | 123 } |
| 122 } | 124 } |
| 123 | 125 |
| 124 main(List args) { | 126 main(List args) { |
| 125 MojoHandle appHandle = new MojoHandle(args[0]); | 127 MojoHandle appHandle = new MojoHandle(args[0]); |
| 126 String url = args[1]; | 128 String url = args[1]; |
| 127 new PingPongApplication.fromHandle(appHandle); | 129 new PingPongApplication.fromHandle(appHandle); |
| 128 } | 130 } |
| OLD | NEW |