| 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 service_object_view_element; | 5 library service_object_view_element; |
| 6 | 6 |
| 7 import 'dart:html'; | 7 import 'dart:html'; |
| 8 import 'package:logging/logging.dart'; | 8 import 'package:logging/logging.dart'; |
| 9 import 'package:observatory/service.dart'; | 9 import 'package:observatory/service.dart'; |
| 10 import 'package:observatory/tracer.dart'; | 10 import 'package:observatory/tracer.dart'; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 element.cls = object; | 27 element.cls = object; |
| 28 return element; | 28 return element; |
| 29 case 'Code': | 29 case 'Code': |
| 30 CodeViewElement element = new Element.tag('code-view'); | 30 CodeViewElement element = new Element.tag('code-view'); |
| 31 element.code = object; | 31 element.code = object; |
| 32 return element; | 32 return element; |
| 33 case 'Function': | 33 case 'Function': |
| 34 FunctionViewElement element = new Element.tag('function-view'); | 34 FunctionViewElement element = new Element.tag('function-view'); |
| 35 element.function = object; | 35 element.function = object; |
| 36 return element; | 36 return element; |
| 37 case 'Object': | |
| 38 return (object) { | |
| 39 switch (object.vmType) { | |
| 40 default: | |
| 41 ObjectViewElement element = new Element.tag('object-view'); | |
| 42 element.object = object; | |
| 43 return element; | |
| 44 } | |
| 45 }(object); | |
| 46 case 'Isolate': | 37 case 'Isolate': |
| 47 IsolateViewElement element = new Element.tag('isolate-view'); | 38 IsolateViewElement element = new Element.tag('isolate-view'); |
| 48 element.isolate = object; | 39 element.isolate = object; |
| 49 return element; | 40 return element; |
| 50 case 'Library': | 41 case 'Library': |
| 51 LibraryViewElement element = new Element.tag('library-view'); | 42 LibraryViewElement element = new Element.tag('library-view'); |
| 52 element.library = object; | 43 element.library = object; |
| 53 return element; | 44 return element; |
| 54 case 'Script': | 45 case 'Script': |
| 55 ScriptViewElement element = new Element.tag('script-view'); | 46 ScriptViewElement element = new Element.tag('script-view'); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 127 |
| 137 dynamic expander() { | 128 dynamic expander() { |
| 138 return expandEvent; | 129 return expandEvent; |
| 139 } | 130 } |
| 140 | 131 |
| 141 void expandEvent(bool exp, var done) { | 132 void expandEvent(bool exp, var done) { |
| 142 expand = exp; | 133 expand = exp; |
| 143 done(); | 134 done(); |
| 144 } | 135 } |
| 145 } | 136 } |
| OLD | NEW |