| 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 part of dart._vmservice; | 5 part of dart._vmservice; |
| 6 | 6 |
| 7 class Message { | 7 class Message { |
| 8 final Completer _completer = new Completer.sync(); | 8 final Completer _completer = new Completer.sync(); |
| 9 bool get completed => _completer.isCompleted; | 9 bool get completed => _completer.isCompleted; |
| 10 /// Future of response. | 10 /// Future of response. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // maintain the list of supported methods below. | 123 // maintain the list of supported methods below. |
| 124 bool _methodNeedsObjectParameters(String method) { | 124 bool _methodNeedsObjectParameters(String method) { |
| 125 switch (method) { | 125 switch (method) { |
| 126 case '_listDevFS': | 126 case '_listDevFS': |
| 127 case '_listDevFSFiles': | 127 case '_listDevFSFiles': |
| 128 case '_createDevFS': | 128 case '_createDevFS': |
| 129 case '_deleteDevFS': | 129 case '_deleteDevFS': |
| 130 case '_writeDevFSFile': | 130 case '_writeDevFSFile': |
| 131 case '_writeDevFSFiles': | 131 case '_writeDevFSFiles': |
| 132 case '_readDevFSFile': | 132 case '_readDevFSFile': |
| 133 case '_spawnUri': |
| 133 return true; | 134 return true; |
| 134 default: | 135 default: |
| 135 return false; | 136 return false; |
| 136 } | 137 } |
| 137 } | 138 } |
| 138 | 139 |
| 139 Future<String> sendToVM() { | 140 Future<String> sendToVM() { |
| 140 final receivePort = new RawReceivePort(); | 141 final receivePort = new RawReceivePort(); |
| 141 receivePort.handler = (value) { | 142 receivePort.handler = (value) { |
| 142 receivePort.close(); | 143 receivePort.close(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 176 } |
| 176 | 177 |
| 177 void setErrorResponse(int code, String details) { | 178 void setErrorResponse(int code, String details) { |
| 178 _completer.complete(encodeRpcError(this, code, | 179 _completer.complete(encodeRpcError(this, code, |
| 179 details: '$method: $details')); | 180 details: '$method: $details')); |
| 180 } | 181 } |
| 181 } | 182 } |
| 182 | 183 |
| 183 external bool sendIsolateServiceMessage(SendPort sp, List m); | 184 external bool sendIsolateServiceMessage(SendPort sp, List m); |
| 184 external void sendRootServiceMessage(List m); | 185 external void sendRootServiceMessage(List m); |
| 185 external void sendObjectRootServiceMessage(List m); | 186 external void sendObjectRootServiceMessage(List m); |
| OLD | NEW |