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

Side by Side Diff: services/dart/test/pingpong_target/main.dart

Issue 973293002: Gets dart working with new Application::AcceptConnection param (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« mojo/public/dart/src/application.dart ('K') | « services/dart/test/pingpong/main.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698