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

Side by Side Diff: examples/dart/hello_world/world/main.dart

Issue 1132063007: Rationalize Dart mojo and sky package structure (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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/hello_world/world/BUILD.gn ('k') | examples/dart/netcat/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This app is run by examples/dart/hello_world/hello. 5 // This app is run by examples/dart/hello_world/hello.
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:mojo/public/dart/application.dart'; 9 import 'package:mojo/application.dart';
10 import 'package:mojo/public/dart/bindings.dart'; 10 import 'package:mojo/bindings.dart';
11 import 'package:mojo/public/dart/core.dart'; 11 import 'package:mojo/core.dart';
12 12
13 class World extends Application { 13 class World extends Application {
14 World.fromHandle(MojoHandle handle) : super.fromHandle(handle); 14 World.fromHandle(MojoHandle handle) : super.fromHandle(handle);
15 15
16 void initialize(List<String> args, String url) { 16 void initialize(List<String> args, String url) {
17 print("$url World"); 17 print("$url World");
18 closeApplication(); 18 closeApplication();
19 } 19 }
20 20
21 Future closeApplication() async { 21 Future closeApplication() async {
22 await close(); 22 await close();
23 assert(MojoHandle.reportLeakedHandles()); 23 assert(MojoHandle.reportLeakedHandles());
24 } 24 }
25 } 25 }
26 26
27 main(List args) { 27 main(List args) {
28 MojoHandle appHandle = new MojoHandle(args[0]); 28 MojoHandle appHandle = new MojoHandle(args[0]);
29 new World.fromHandle(appHandle); 29 new World.fromHandle(appHandle);
30 } 30 }
OLDNEW
« no previous file with comments | « examples/dart/hello_world/world/BUILD.gn ('k') | examples/dart/netcat/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698