| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/public/dart/application.dart'; | 7 import 'package:mojo/application.dart'; |
| 8 import 'package:mojo/public/dart/bindings.dart'; | 8 import 'package:mojo/bindings.dart'; |
| 9 import 'package:mojo/public/dart/core.dart'; | 9 import 'package:mojo/core.dart'; |
| 10 import 'package:mojom/dart/test/echo_service.mojom.dart'; | 10 import 'package:mojom/dart/test/echo_service.mojom.dart'; |
| 11 | 11 |
| 12 class EchoServiceImpl implements EchoService { | 12 class EchoServiceImpl implements EchoService { |
| 13 EchoServiceStub _stub; | 13 EchoServiceStub _stub; |
| 14 Application _application; | 14 Application _application; |
| 15 | 15 |
| 16 EchoServiceImpl(this._application, MojoMessagePipeEndpoint endpoint) { | 16 EchoServiceImpl(this._application, MojoMessagePipeEndpoint endpoint) { |
| 17 _stub = new EchoServiceStub.fromEndpoint(endpoint, this); | 17 _stub = new EchoServiceStub.fromEndpoint(endpoint, this); |
| 18 } | 18 } |
| 19 | 19 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 46 } | 46 } |
| 47 | 47 |
| 48 main(List args) { | 48 main(List args) { |
| 49 MojoHandle appHandle = new MojoHandle(args[0]); | 49 MojoHandle appHandle = new MojoHandle(args[0]); |
| 50 String url = args[1]; | 50 String url = args[1]; |
| 51 new EchoApplication.fromHandle(appHandle) | 51 new EchoApplication.fromHandle(appHandle) |
| 52 ..onError = (() { | 52 ..onError = (() { |
| 53 assert(MojoHandle.reportLeakedHandles()); | 53 assert(MojoHandle.reportLeakedHandles()); |
| 54 }); | 54 }); |
| 55 } | 55 } |
| OLD | NEW |