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

Side by Side Diff: sdk/lib/vmservice/message.dart

Issue 2072543002: First cut at _spawnUri rpc in the vm service. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review Created 4 years, 5 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 | « runtime/vm/service_event.cc ('k') | sdk/lib/vmservice/vmservice.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) 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
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
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);
OLDNEW
« no previous file with comments | « runtime/vm/service_event.cc ('k') | sdk/lib/vmservice/vmservice.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698