| 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 25 matching lines...) Expand all Loading... |
| 36 _stub.close(); | 36 _stub.close(); |
| 37 if (_application != null) { | 37 if (_application != null) { |
| 38 _application.close(); | 38 _application.close(); |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 | 42 |
| 43 class PingPongApplication extends Application { | 43 class PingPongApplication extends Application { |
| 44 PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle); | 44 PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle); |
| 45 | 45 |
| 46 void acceptConnection(String requestorUrl, ApplicationConnection connection) { | 46 @override |
| 47 void acceptConnection(String requestorUrl, String resolvedUrl, |
| 48 ApplicationConnection connection) { |
| 47 connection.provideService(PingPongServiceName, | 49 connection.provideService(PingPongServiceName, |
| 48 (endpoint) => new PingPongServiceImpl(this, endpoint)); | 50 (endpoint) => new PingPongServiceImpl(this, endpoint)); |
| 49 connection.listen(); | 51 connection.listen(); |
| 50 } | 52 } |
| 51 } | 53 } |
| 52 | 54 |
| 53 main(List args) { | 55 main(List args) { |
| 54 MojoHandle appHandle = new MojoHandle(args[0]); | 56 MojoHandle appHandle = new MojoHandle(args[0]); |
| 55 String url = args[1]; | 57 String url = args[1]; |
| 56 new PingPongApplication.fromHandle(appHandle); | 58 new PingPongApplication.fromHandle(appHandle); |
| 57 } | 59 } |
| OLD | NEW |