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: examples/dart/wget/main.dart

Issue 1129063008: Move mojom definitions of URL{Request,Response} into SDK (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update for monet Created 5 years, 6 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/wget/BUILD.gn ('k') | mojo/dart/embedder/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 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:typed_data'; 9 import 'dart:typed_data';
10 10
11 import 'package:mojo/application.dart'; 11 import 'package:mojo/application.dart';
12 import 'package:mojo/bindings.dart'; 12 import 'package:mojo/bindings.dart';
13 import 'package:mojo/core.dart'; 13 import 'package:mojo/core.dart';
14 import 'package:mojom/mojo/network_service.mojom.dart'; 14 import 'package:mojom/mojo/network_service.mojom.dart';
15 import 'package:mojom/mojo/url_loader.mojom.dart'; 15 import 'package:mojom/mojo/url_loader.mojom.dart';
16 import 'package:mojom/mojo/url_request.mojom.dart';
16 17
17 class WGet extends Application { 18 class WGet extends Application {
18 NetworkServiceProxy _networkService; 19 NetworkServiceProxy _networkService;
19 UrlLoaderProxy _urlLoader; 20 UrlLoaderProxy _urlLoader;
20 21
21 WGet.fromHandle(MojoHandle handle) : super.fromHandle(handle); 22 WGet.fromHandle(MojoHandle handle) : super.fromHandle(handle);
22 23
23 void initialize(List<String> args, String url) { 24 void initialize(List<String> args, String url) {
24 run(args); 25 run(args);
25 } 26 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 _urlLoader = null; 70 _urlLoader = null;
70 _networkService.close(); 71 _networkService.close();
71 _networkService = null; 72 _networkService = null;
72 } 73 }
73 } 74 }
74 75
75 main(List args) { 76 main(List args) {
76 MojoHandle appHandle = new MojoHandle(args[0]); 77 MojoHandle appHandle = new MojoHandle(args[0]);
77 new WGet.fromHandle(appHandle); 78 new WGet.fromHandle(appHandle);
78 } 79 }
OLDNEW
« no previous file with comments | « examples/dart/wget/BUILD.gn ('k') | mojo/dart/embedder/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698