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

Side by Side Diff: runtime/bin/vmservice/client/lib/service_html.dart

Issue 322483005: Final Observatory 1.5 fixes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | runtime/bin/vmservice/client/lib/src/app/application.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library service_html; 5 library service_html;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:html'; 9 import 'dart:html';
10 10
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 assert(completer != null); 155 assert(completer != null);
156 _pendingRequests.remove(id); 156 _pendingRequests.remove(id);
157 completer.complete(data); 157 completer.complete(data);
158 } 158 }
159 159
160 Future<String> getString(String path) { 160 Future<String> getString(String path) {
161 var idString = '$_requestSerial'; 161 var idString = '$_requestSerial';
162 Map message = {}; 162 Map message = {};
163 message['id'] = idString; 163 message['id'] = idString;
164 message['method'] = 'observatoryQuery'; 164 message['method'] = 'observatoryQuery';
165 message['query'] = '/$path'; 165 message['query'] = '$path';
166 _requestSerial++; 166 _requestSerial++;
167 var completer = new Completer(); 167 var completer = new Completer();
168 _pendingRequests[idString] = completer; 168 _pendingRequests[idString] = completer;
169 window.parent.postMessage(JSON.encode(message), '*'); 169 window.parent.postMessage(JSON.encode(message), '*');
170 return completer.future; 170 return completer.future;
171 } 171 }
172 } 172 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/vmservice/client/lib/src/app/application.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698