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

Side by Side Diff: examples/dart/netcat/main.dart

Issue 1071693003: Uses mojom module names as Dart's package: import URI (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 5 years, 8 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/device_info/main.dart ('k') | examples/dart/wget/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 // 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:core'; 6 import 'dart:core';
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 8
9 import 'package:mojo/public/dart/application.dart'; 9 import 'package:mojo/public/dart/application.dart';
10 import 'package:mojo/public/dart/bindings.dart'; 10 import 'package:mojo/public/dart/bindings.dart';
11 import 'package:mojo/public/dart/core.dart'; 11 import 'package:mojo/public/dart/core.dart';
12 import 'package:mojo/services/files/public/interfaces/file.mojom.dart' as files; 12 import 'package:mojo/files/file.mojom.dart' as files;
13 import 'package:mojo/services/files/public/interfaces/types.mojom.dart' 13 import 'package:mojo/files/types.mojom.dart' as files;
14 as files; 14 import 'package:mojo/net_address.mojom.dart';
15 import 'package:mojo/services/network/public/interfaces/net_address.mojom.dart'; 15 import 'package:mojo/network_error.mojom.dart';
16 import 'package:mojo/services/network/public/interfaces/network_error.mojom.dart '; 16 import 'package:mojo/network_service.mojom.dart';
17 import 'package:mojo/services/network/public/interfaces/network_service.mojom.da rt'; 17 import 'package:mojo/tcp_bound_socket.mojom.dart';
18 import 'package:mojo/services/network/public/interfaces/tcp_bound_socket.mojom.d art'; 18 import 'package:mojo/tcp_connected_socket.mojom.dart';
19 import 'package:mojo/services/network/public/interfaces/tcp_connected_socket.moj om.dart'; 19 import 'package:mojo/terminal/terminal_client.mojom.dart';
20 import 'package:mojo/services/terminal/public/interfaces/terminal_client.mojom.d art';
21 20
22 void ignoreFuture(Future f) { 21 void ignoreFuture(Future f) {
23 f.catchError((e) {}); 22 f.catchError((e) {});
24 } 23 }
25 24
26 NetAddress makeIPv4NetAddress(List<int> addr, int port) { 25 NetAddress makeIPv4NetAddress(List<int> addr, int port) {
27 var rv = new NetAddress(); 26 var rv = new NetAddress();
28 rv.family = NetAddressFamily_IPV4; 27 rv.family = NetAddressFamily_IPV4;
29 rv.ipv4 = new NetAddressIPv4(); 28 rv.ipv4 = new NetAddressIPv4();
30 rv.ipv4.addr = new List<int>.from(addr); 29 rv.ipv4.addr = new List<int>.from(addr);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 202 }
204 203
205 main(List args) { 204 main(List args) {
206 MojoHandle appHandle = new MojoHandle(args[0]); 205 MojoHandle appHandle = new MojoHandle(args[0]);
207 String url = args[1]; 206 String url = args[1];
208 new NetcatApplication.fromHandle(appHandle) 207 new NetcatApplication.fromHandle(appHandle)
209 ..onError = (() { 208 ..onError = (() {
210 assert(MojoHandle.reportLeakedHandles()); 209 assert(MojoHandle.reportLeakedHandles());
211 }); 210 });
212 } 211 }
OLDNEW
« no previous file with comments | « examples/dart/device_info/main.dart ('k') | examples/dart/wget/main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698