| 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_profile_element; | 5 library isolate_profile_element; |
| 6 | 6 |
| 7 import 'dart:html'; | 7 import 'dart:html'; |
| 8 import 'observatory_element.dart'; | 8 import 'observatory_element.dart'; |
| 9 import 'package:logging/logging.dart'; | 9 import 'package:logging/logging.dart'; |
| 10 import 'package:observatory/service.dart'; | 10 import 'package:observatory/service.dart'; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 void tagSelectorChanged(oldValue) { | 137 void tagSelectorChanged(oldValue) { |
| 138 refresh(null); | 138 refresh(null); |
| 139 } | 139 } |
| 140 | 140 |
| 141 void refresh(var done) { | 141 void refresh(var done) { |
| 142 var request = 'profile?tags=$tagSelector'; | 142 var request = 'profile?tags=$tagSelector'; |
| 143 profile.isolate.get(request).then((ServiceMap m) { | 143 profile.isolate.get(request).then((ServiceMap m) { |
| 144 // Assert we got back the a profile. | 144 // Assert we got back the a profile. |
| 145 assert(m.serviceType == 'Profile'); | 145 assert(m.type == 'Profile'); |
| 146 profile = m; | 146 profile = m; |
| 147 }).whenComplete(done); | 147 }).whenComplete(done); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void _update() { | 150 void _update() { |
| 151 if (profile == null) { | 151 if (profile == null) { |
| 152 return; | 152 return; |
| 153 } | 153 } |
| 154 _buildTree(); | 154 _buildTree(); |
| 155 } | 155 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 if (row is TableRowElement) { | 201 if (row is TableRowElement) { |
| 202 // Subtract 1 to get 0 based indexing. | 202 // Subtract 1 to get 0 based indexing. |
| 203 try { | 203 try { |
| 204 tree.toggle(row.rowIndex - 1); | 204 tree.toggle(row.rowIndex - 1); |
| 205 } catch (e, stackTrace) { | 205 } catch (e, stackTrace) { |
| 206 Logger.root.warning('toggleExpanded', e, stackTrace); | 206 Logger.root.warning('toggleExpanded', e, stackTrace); |
| 207 } | 207 } |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 } | 210 } |
| OLD | NEW |