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

Unified 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: remove old-style standalone tests. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/vmservice/server.dart ('k') | runtime/observatory/lib/service_common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/vmservice_dartium.dart
diff --git a/runtime/bin/vmservice/vmservice_dartium.dart b/runtime/bin/vmservice/vmservice_dartium.dart
deleted file mode 100644
index 99f04fa8dbcf686e90d013159f8e8b7a9f481caf..0000000000000000000000000000000000000000
--- a/runtime/bin/vmservice/vmservice_dartium.dart
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library vmservice_dartium;
-
-import 'dart:isolate';
-import 'vmservice.dart';
-
-// The receive port that isolate startup / shutdown messages are delivered on.
-RawReceivePort _receivePort;
-// The receive port that service request messages are delivered on.
-RawReceivePort _requestPort;
-
-// The native method that is called to post the response back to DevTools.
-void postResponse(String response, int cookie) native "VMService_PostResponse";
-
-/// Dartium recieves messages through the _requestPort and posts
-/// responses via postResponse. It has a single persistent client.
-class DartiumClient extends Client {
- DartiumClient(port, service) : super(service) {
- port.handler = ((message) {
- if (message == null) {
- return;
- }
- if (message is! List) {
- return;
- }
- if (message.length != 2) {
- return;
- }
- if (message[0] is! String) {
- return;
- }
- var uri = Uri.parse(message[0]);
- var cookie = message[1];
- onMessage(cookie, new Message.fromUri(uri));
- });
- }
-
- void post(var seq, String response) {
- postResponse(response, seq);
- }
-
- dynamic toJson() {
- var map = super.toJson();
- map['type'] = 'DartiumClient';
- }
-}
-
-
-main() {
- // Create VmService.
- var service = new VMService();
- _receivePort = service.receivePort;
- _requestPort = new RawReceivePort();
- new DartiumClient(_requestPort, service);
-}
« no previous file with comments | « runtime/bin/vmservice/server.dart ('k') | runtime/observatory/lib/service_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698