| 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 | 6 |
| 7 import 'package:mojo/application.dart'; | 7 import 'package:mojo/application.dart'; |
| 8 import 'package:mojo/bindings.dart'; | 8 import 'package:mojo/bindings.dart'; |
| 9 import 'package:mojo/core.dart'; | 9 import 'package:mojo/core.dart'; |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 | 30 |
| 31 void ping(int pingValue) => _pingPongClient.ptr.pong(pingValue + 1); | 31 void ping(int pingValue) => _pingPongClient.ptr.pong(pingValue + 1); |
| 32 | 32 |
| 33 // These methods are unimplemented; they merely throw on invocation. | 33 // These methods are unimplemented; they merely throw on invocation. |
| 34 dynamic pingTargetUrl(String url, int count, [Function responseFactory]) => | 34 dynamic pingTargetUrl(String url, int count, [Function responseFactory]) => |
| 35 throw "Unimplemented"; | 35 throw "Unimplemented"; |
| 36 dynamic pingTargetService( | 36 dynamic pingTargetService( |
| 37 Object service, int count, [Function responseFactory]) => | 37 Object service, int count, [Function responseFactory]) => |
| 38 throw "Unimplemented"; | 38 throw "Unimplemented"; |
| 39 dynamic getPingPongServiceDelayed( |
| 40 Object service, [Function responseFactory]) => |
| 41 throw "Unimplemented"; |
| 42 |
| 39 void getPingPongService(Object service) { | 43 void getPingPongService(Object service) { |
| 40 new PingPongServiceImpl.fromStub(service); | 44 new PingPongServiceImpl.fromStub(service); |
| 41 } | 45 } |
| 42 | 46 |
| 43 void quit() {} | 47 void quit() {} |
| 44 } | 48 } |
| 45 | 49 |
| 46 class PingPongApplication extends Application { | 50 class PingPongApplication extends Application { |
| 47 PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle); | 51 PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle); |
| 48 | 52 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 60 Future closeApplication() async { | 64 Future closeApplication() async { |
| 61 await close(); | 65 await close(); |
| 62 MojoHandle.reportLeakedHandles(); | 66 MojoHandle.reportLeakedHandles(); |
| 63 } | 67 } |
| 64 } | 68 } |
| 65 | 69 |
| 66 main(List args, Object handleToken) { | 70 main(List args, Object handleToken) { |
| 67 MojoHandle appHandle = new MojoHandle(handleToken); | 71 MojoHandle appHandle = new MojoHandle(handleToken); |
| 68 new PingPongApplication.fromHandle(appHandle); | 72 new PingPongApplication.fromHandle(appHandle); |
| 69 } | 73 } |
| OLD | NEW |