OLD | NEW |
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 |
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 isolate_view_element; | 5 library isolate_view_element; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'observatory_element.dart'; | 8 import 'observatory_element.dart'; |
9 import 'package:observatory/app.dart'; | 9 import 'package:observatory/app.dart'; |
10 import 'package:observatory/service.dart'; | 10 import 'package:observatory/service.dart'; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 var element = shadowRoot.querySelector('#tagProfileChart'); | 114 var element = shadowRoot.querySelector('#tagProfileChart'); |
115 if (element != null) { | 115 if (element != null) { |
116 tagProfileChart.draw(element); | 116 tagProfileChart.draw(element); |
117 } | 117 } |
118 } | 118 } |
119 | 119 |
120 void refresh(var done) { | 120 void refresh(var done) { |
121 isolate.reload().whenComplete(done); | 121 isolate.reload().whenComplete(done); |
122 } | 122 } |
123 | 123 |
124 void resume(var a, var b, var c) { | 124 Future pause(_) { |
125 isolate.get("resume").then((result) { | 125 return isolate.get("debug/pause").then((result) { |
126 // TODO(turnidge): Instead of asserting here, handling errors | 126 // TODO(turnidge): Instead of asserting here, handle errors |
127 // properly. | 127 // properly. |
128 assert(result.serviceType == 'Success'); | 128 assert(result.serviceType == 'Success'); |
129 isolate.reload(); | 129 return isolate.reload(); |
130 }); | 130 }); |
| 131 } |
| 132 |
| 133 Future resume(_) { |
| 134 return isolate.get("resume").then((result) { |
| 135 // TODO(turnidge): Instead of asserting here, handle errors |
| 136 // properly. |
| 137 assert(result.serviceType == 'Success'); |
| 138 return isolate.reload(); |
| 139 }); |
131 } | 140 } |
132 } | 141 } |
OLD | NEW |