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

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

Issue 8386029: Consistently use setters to set event handlers in native APIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 | « runtime/bin/directory_impl.dart ('k') | runtime/bin/process_impl.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 interface Process factory _Process { 5 interface Process factory _Process {
6 /* 6 /*
7 * Creates a new process object preparing to run the executable 7 * Creates a new process object preparing to run the executable
8 * found at [path] with the specified [arguments]. 8 * found at [path] with the specified [arguments].
9 */ 9 */
10 Process(String path, List<String> arguments); 10 Process(String path, List<String> arguments);
(...skipping 17 matching lines...) Expand all
28 InputStream get stderr(); 28 InputStream get stderr();
29 29
30 /* 30 /*
31 * Returns an output stream to the process stdin. 31 * Returns an output stream to the process stdin.
32 */ 32 */
33 OutputStream get stdin(); 33 OutputStream get stdin();
34 34
35 /* 35 /*
36 * Sets an exit handler which gets invoked when the process terminates. 36 * Sets an exit handler which gets invoked when the process terminates.
37 */ 37 */
38 void setExitHandler(void callback(int exitCode)); 38 void set exitHandler(void callback(int exitCode));
39 39
40 /* 40 /*
41 * Kills the process with [signal]. 41 * Kills the process with [signal].
42 */ 42 */
43 bool kill(); 43 bool kill();
44 44
45 /* 45 /*
46 * Terminates the streams and closes the exit handler of a process. 46 * Terminates the streams and closes the exit handler of a process.
47 */ 47 */
48 void close(); 48 void close();
49 } 49 }
50 50
51 51
52 class ProcessException implements Exception { 52 class ProcessException implements Exception {
53 const ProcessException([String this.message, int this.errorCode = 0]); 53 const ProcessException([String this.message, int this.errorCode = 0]);
54 String toString() => "ProcessException: $message"; 54 String toString() => "ProcessException: $message";
55 55
56 /* 56 /*
57 * Contains the system message for the process exception if any. 57 * Contains the system message for the process exception if any.
58 */ 58 */
59 final String message; 59 final String message;
60 60
61 /* 61 /*
62 * Contains the OS error code for the process exception if any. 62 * Contains the OS error code for the process exception if any.
63 */ 63 */
64 final int errorCode; 64 final int errorCode;
65 } 65 }
OLDNEW
« no previous file with comments | « runtime/bin/directory_impl.dart ('k') | runtime/bin/process_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698