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

Side by Side Diff: examples/dart/hello_world/hello/lib/main.dart

Issue 1964193002: Dart: Refactors Proxies (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address comments Created 4 years, 7 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
« no previous file with comments | « examples/dart/echo_client/lib/main.dart ('k') | examples/dart/netcat/lib/main.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!mojo mojo:dart_content_handler 1 #!mojo mojo:dart_content_handler
2 // Copyright 2015 The Chromium Authors. All rights reserved. 2 // Copyright 2015 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 // To run this app: 6 // To run this app:
7 // mojo_shell mojo:hello 7 // mojo_shell mojo:hello
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 10
(...skipping 11 matching lines...) Expand all
22 print("Connecting to $worldUrl"); 22 print("Connecting to $worldUrl");
23 23
24 // We expect to find the world mojo application at the same 24 // We expect to find the world mojo application at the same
25 // path as this application. 25 // path as this application.
26 var c = connectToApplication(worldUrl); 26 var c = connectToApplication(worldUrl);
27 27
28 // A call to close() here would cause this app to go down before the "world" 28 // A call to close() here would cause this app to go down before the "world"
29 // app has a chance to come up. Instead, we wait to close this app until 29 // app has a chance to come up. Instead, we wait to close this app until
30 // the "world" app comes up, does its print, and closes its end of the 30 // the "world" app comes up, does its print, and closes its end of the
31 // connection. 31 // connection.
32 c.remoteServiceProvider.impl.onError = closeApplication; 32 c.remoteServiceProvider.ctrl.onError = closeApplication;
33 } 33 }
34 34
35 Future closeApplication(e) async { 35 Future closeApplication(e) async {
36 await close(); 36 await close();
37 MojoHandle.reportLeakedHandles(); 37 MojoHandle.reportLeakedHandles();
38 } 38 }
39 } 39 }
40 40
41 main(List args, Object handleToken) { 41 main(List args, Object handleToken) {
42 MojoHandle appHandle = new MojoHandle(handleToken); 42 MojoHandle appHandle = new MojoHandle(handleToken);
43 new Hello.fromHandle(appHandle); 43 new Hello.fromHandle(appHandle);
44 } 44 }
OLDNEW
« no previous file with comments | « examples/dart/echo_client/lib/main.dart ('k') | examples/dart/netcat/lib/main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698