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

Side by Side Diff: runtime/bin/vmservice/vmservice_dartium.dart

Issue 823403004: Begin migrating the vm service from a rest-style interface to a json-rpc style interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fjkdls Created 5 years, 10 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
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
Cutch 2015/02/02 22:20:04 This whole file can be killed now.
turnidge 2015/02/02 22:44:05 Done.
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 library vmservice_dartium; 5 library vmservice_dartium;
6 6
7 import 'dart:isolate'; 7 import 'dart:isolate';
8 import 'vmservice.dart'; 8 import 'vmservice.dart';
9 9
10 // The receive port that isolate startup / shutdown messages are delivered on. 10 // The receive port that isolate startup / shutdown messages are delivered on.
11 RawReceivePort _receivePort; 11 RawReceivePort _receivePort;
(...skipping 19 matching lines...) Expand all
31 } 31 }
32 if (message[0] is! String) { 32 if (message[0] is! String) {
33 return; 33 return;
34 } 34 }
35 var uri = Uri.parse(message[0]); 35 var uri = Uri.parse(message[0]);
36 var cookie = message[1]; 36 var cookie = message[1];
37 onMessage(cookie, new Message.fromUri(uri)); 37 onMessage(cookie, new Message.fromUri(uri));
38 }); 38 });
39 } 39 }
40 40
41 void post(var seq, String response) { 41 void post(var serial, String response) {
42 postResponse(response, seq); 42 postResponse(response, serial);
43 } 43 }
44 44
45 dynamic toJson() { 45 dynamic toJson() {
46 var map = super.toJson(); 46 var map = super.toJson();
47 map['type'] = 'DartiumClient'; 47 map['type'] = 'DartiumClient';
48 } 48 }
49 } 49 }
50 50
51 51
52 main() { 52 main() {
53 // Create VmService. 53 // Create VmService.
54 var service = new VMService(); 54 var service = new VMService();
55 _receivePort = service.receivePort; 55 _receivePort = service.receivePort;
56 _requestPort = new RawReceivePort(); 56 _requestPort = new RawReceivePort();
57 new DartiumClient(_requestPort, service); 57 new DartiumClient(_requestPort, service);
58 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698