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

Side by Side Diff: runtime/bin/process_patch.dart

Issue 11823050: Remove accidental addition of new stream API in dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/io/process.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 patch class _WindowsCodePageDecoder { 5 patch class _WindowsCodePageDecoder {
6 /* patch */ static String _decodeBytes(List<int> bytes) 6 /* patch */ static String _decodeBytes(List<int> bytes)
7 native "SystemEncodingToString"; 7 native "SystemEncodingToString";
8 } 8 }
9 9
10 10
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 bool kill([ProcessSignal signal = ProcessSignal.SIGTERM]) { 249 bool kill([ProcessSignal signal = ProcessSignal.SIGTERM]) {
250 if (signal is! ProcessSignal) { 250 if (signal is! ProcessSignal) {
251 throw new ArgumentError( 251 throw new ArgumentError(
252 "Argument 'signal' must be a ProcessSignal"); 252 "Argument 'signal' must be a ProcessSignal");
253 } 253 }
254 assert(_started); 254 assert(_started);
255 if (_ended) return false; 255 if (_ended) return false;
256 return _kill(this, signal._signalNumber); 256 return _kill(this, signal._signalNumber);
257 } 257 }
258 258
259 void add(List<int> data) {
260 stdin.write(data);
261 }
262
263 void close() {
264 stdin.close();
265 }
266
267 void signalError(ASyncError error) {
268 // TODO(ajohnsen): close?
269 }
270
271 Stream<List<int>> get stdoutStream
272 => new _InputStreamController(stdout).stream;
273
274 Stream<List<int>> get stderrStream
275 => new _InputStreamController(stderr).stream;
276
277 bool _kill(Process p, int signal) native "Process_Kill"; 259 bool _kill(Process p, int signal) native "Process_Kill";
278 260
279 void set onExit(void callback(int exitCode)) { 261 void set onExit(void callback(int exitCode)) {
280 if (_ended) callback(_exitCode); 262 if (_ended) callback(_exitCode);
281 _onExit = callback; 263 _onExit = callback;
282 } 264 }
283 265
284 String _path; 266 String _path;
285 List<String> _arguments; 267 List<String> _arguments;
286 String _workingDirectory; 268 String _workingDirectory;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 370
389 class _ProcessResult implements ProcessResult { 371 class _ProcessResult implements ProcessResult {
390 const _ProcessResult(int this.exitCode, 372 const _ProcessResult(int this.exitCode,
391 String this.stdout, 373 String this.stdout,
392 String this.stderr); 374 String this.stderr);
393 375
394 final int exitCode; 376 final int exitCode;
395 final String stdout; 377 final String stdout;
396 final String stderr; 378 final String stderr;
397 } 379 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/process.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698