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

Side by Side Diff: mojo/dart/apptests/test_apps/pingpong/lib/main.dart

Issue 1753013002: Mojom runtime type info: New implementation for Dart. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: No changes to sha1s Created 4 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 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 class PingPongApplication extends Application { 110 class PingPongApplication extends Application {
111 PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle); 111 PingPongApplication.fromHandle(MojoHandle handle) : super.fromHandle(handle);
112 112
113 @override 113 @override
114 void acceptConnection(String requestorUrl, String resolvedUrl, 114 void acceptConnection(String requestorUrl, String resolvedUrl,
115 ApplicationConnection connection) { 115 ApplicationConnection connection) {
116 // No services are required from the remote end. 116 // No services are required from the remote end.
117 connection.remoteServiceProvider.close(); 117 connection.remoteServiceProvider.close();
118 118
119 connection.provideService(PingPongService.serviceName, 119 connection.provideService(PingPongService.serviceName,
120 (endpoint) => new PingPongServiceImpl(this, endpoint)); 120 (endpoint) => new PingPongServiceImpl(this, endpoint),
121 description: PingPongServiceStub.serviceDescription);
121 } 122 }
122 } 123 }
123 124
124 main(List args, Object handleToken) { 125 main(List args, Object handleToken) {
125 MojoHandle appHandle = new MojoHandle(handleToken); 126 MojoHandle appHandle = new MojoHandle(handleToken);
126 new PingPongApplication.fromHandle(appHandle) 127 new PingPongApplication.fromHandle(appHandle)
127 ..onError = ((_) { 128 ..onError = ((_) {
128 MojoHandle.reportLeakedHandles(); 129 MojoHandle.reportLeakedHandles();
129 }); 130 });
130 } 131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698