OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 // The NativeFieldWrapperClass1 can not be used with a mixin, due to missing | 175 // The NativeFieldWrapperClass1 can not be used with a mixin, due to missing |
176 // implicit constructor. | 176 // implicit constructor. |
177 class _ProcessImplNativeWrapper extends NativeFieldWrapperClass1 {} | 177 class _ProcessImplNativeWrapper extends NativeFieldWrapperClass1 {} |
178 | 178 |
179 class _ProcessImpl extends _ProcessImplNativeWrapper implements Process { | 179 class _ProcessImpl extends _ProcessImplNativeWrapper implements Process { |
180 _ProcessResourceInfo _resourceInfo; | 180 _ProcessResourceInfo _resourceInfo; |
181 static bool connectedResourceHandler = false; | 181 static bool connectedResourceHandler = false; |
182 | 182 |
183 _ProcessImpl(String path, | 183 _ProcessImpl(String path, |
184 List<String> arguments, | 184 List<String> arguments, |
185 String this._workingDirectory, | 185 this._workingDirectory, |
186 Map<String, String> environment, | 186 Map<String, String> environment, |
187 bool includeParentEnvironment, | 187 bool includeParentEnvironment, |
188 bool runInShell, | 188 bool runInShell, |
189 ProcessStartMode mode) : super() { | 189 ProcessStartMode mode) : super() { |
190 if (!connectedResourceHandler) { | 190 if (!connectedResourceHandler) { |
191 registerExtension('ext.dart.io.getProcesses', | 191 registerExtension('ext.dart.io.getProcesses', |
192 _ProcessResourceInfo.getStartedProcesses); | 192 _ProcessResourceInfo.getStartedProcesses); |
193 registerExtension('ext.dart.io.getProcessById', | 193 registerExtension('ext.dart.io.getProcessById', |
194 _ProcessResourceInfo.getProcessInfoMapById); | 194 _ProcessResourceInfo.getProcessInfoMapById); |
195 connectedResourceHandler = true; | 195 connectedResourceHandler = true; |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 Encoding stderrEncoding) { | 595 Encoding stderrEncoding) { |
596 var process = new _ProcessImpl(executable, | 596 var process = new _ProcessImpl(executable, |
597 arguments, | 597 arguments, |
598 workingDirectory, | 598 workingDirectory, |
599 environment, | 599 environment, |
600 includeParentEnvironment, | 600 includeParentEnvironment, |
601 runInShell, | 601 runInShell, |
602 ProcessStartMode.NORMAL); | 602 ProcessStartMode.NORMAL); |
603 return process._runAndWait(stdoutEncoding, stderrEncoding); | 603 return process._runAndWait(stdoutEncoding, stderrEncoding); |
604 } | 604 } |
OLD | NEW |