OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 timeline_page_element; | 5 library timeline_page_element; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:html'; | 8 import 'dart:html'; |
9 import 'dart:convert'; | 9 import 'dart:convert'; |
10 import 'package:observatory/service.dart' as S; | 10 import 'package:observatory/service.dart' as S; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 return 'none'; | 189 return 'none'; |
190 case _Profile.dart: | 190 case _Profile.dart: |
191 return 'Dart Developer'; | 191 return 'Dart Developer'; |
192 case _Profile.vm: | 192 case _Profile.vm: |
193 return 'VM Developer'; | 193 return 'VM Developer'; |
194 case _Profile.all: | 194 case _Profile.all: |
195 return 'All'; | 195 return 'All'; |
196 case _Profile.custom: | 196 case _Profile.custom: |
197 return 'Custom'; | 197 return 'Custom'; |
198 } | 198 } |
199 throw new Exception('Unkown Profile ${profile}'); | 199 throw new Exception('Unknown Profile ${profile}'); |
200 } | 200 } |
201 | 201 |
202 Future _refresh() async { | 202 Future _refresh() async { |
203 S.VM vm = _vm as S.VM; | 203 S.VM vm = _vm as S.VM; |
204 await vm.reload(); | 204 await vm.reload(); |
205 await vm.reloadIsolates(); | 205 await vm.reloadIsolates(); |
206 return _postMessage('refresh'); | 206 return _postMessage('refresh'); |
207 } | 207 } |
208 | 208 |
209 Future _clear() async { | 209 Future _clear() async { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 _availableStreams.clear(); | 328 _availableStreams.clear(); |
329 response['availableStreams'] | 329 response['availableStreams'] |
330 .forEach((String streamName) => _availableStreams.add(streamName)); | 330 .forEach((String streamName) => _availableStreams.add(streamName)); |
331 // Update the set of recorded streams. | 331 // Update the set of recorded streams. |
332 _recordedStreams.clear(); | 332 _recordedStreams.clear(); |
333 response['recordedStreams'] | 333 response['recordedStreams'] |
334 .forEach((String streamName) => _recordedStreams.add(streamName)); | 334 .forEach((String streamName) => _recordedStreams.add(streamName)); |
335 _r.dirty(); | 335 _r.dirty(); |
336 } | 336 } |
337 } | 337 } |
OLD | NEW |