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 // Run with, e.g.: | 5 // Run with, e.g.: |
6 // mojo_shell "mojo:dart_wget http://www.google.com" | 6 // mojo_shell "mojo:dart_wget http://www.google.com" |
7 | 7 |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:mojo_application'; | |
10 import 'dart:mojo_bindings'; | |
11 import 'dart:mojo_core'; | |
12 import 'dart:typed_data'; | 9 import 'dart:typed_data'; |
| 10 import 'mojo:application'; |
| 11 import 'mojo:bindings'; |
| 12 import 'mojo:core'; |
13 | 13 |
14 import 'package:mojo/services/network/public/interfaces/network_service.mojom.da
rt'; | 14 import 'package:mojo/services/network/public/interfaces/network_service.mojom.da
rt'; |
15 import 'package:mojo/services/network/public/interfaces/url_loader.mojom.dart'; | 15 import 'package:mojo/services/network/public/interfaces/url_loader.mojom.dart'; |
16 | 16 |
17 class WGet extends Application { | 17 class WGet extends Application { |
18 NetworkServiceProxy _networkService; | 18 NetworkServiceProxy _networkService; |
19 UrlLoaderProxy _urlLoaderProxy; | 19 UrlLoaderProxy _urlLoaderProxy; |
20 | 20 |
21 WGet.fromHandle(MojoHandle handle) : super.fromHandle(handle); | 21 WGet.fromHandle(MojoHandle handle) : super.fromHandle(handle); |
22 | 22 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 _urlLoaderProxy = null; | 69 _urlLoaderProxy = null; |
70 _networkService = null; | 70 _networkService = null; |
71 } | 71 } |
72 } | 72 } |
73 | 73 |
74 main(List args) { | 74 main(List args) { |
75 MojoHandle appHandle = new MojoHandle(args[0]); | 75 MojoHandle appHandle = new MojoHandle(args[0]); |
76 var wget = new WGet.fromHandle(appHandle); | 76 var wget = new WGet.fromHandle(appHandle); |
77 wget.listen(); | 77 wget.listen(); |
78 } | 78 } |
OLD | NEW |