OLD | NEW |
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 import 'dart:typed_data'; | 10 import 'dart:typed_data'; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 message['id'] = idString; | 94 message['id'] = idString; |
95 message['method'] = 'observatoryQuery'; | 95 message['method'] = 'observatoryQuery'; |
96 message['query'] = '$path'; | 96 message['query'] = '$path'; |
97 _requestSerial++; | 97 _requestSerial++; |
98 var completer = new Completer(); | 98 var completer = new Completer(); |
99 _pendingRequests[idString] = completer; | 99 _pendingRequests[idString] = completer; |
100 window.parent.postMessage(JSON.encode(message), '*'); | 100 window.parent.postMessage(JSON.encode(message), '*'); |
101 return completer.future; | 101 return completer.future; |
102 } | 102 } |
103 } | 103 } |
OLD | NEW |