| 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/elements.dart'; | 10 import 'package:observatory/elements.dart'; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 element.isolate = object; | 68 element.isolate = object; |
| 69 return element; | 69 return element; |
| 70 case 'Library': | 70 case 'Library': |
| 71 LibraryViewElement element = new Element.tag('library-view'); | 71 LibraryViewElement element = new Element.tag('library-view'); |
| 72 element.library = object; | 72 element.library = object; |
| 73 return element; | 73 return element; |
| 74 case 'Profile': | 74 case 'Profile': |
| 75 IsolateProfileElement element = new Element.tag('isolate-profile'); | 75 IsolateProfileElement element = new Element.tag('isolate-profile'); |
| 76 element.profile = object; | 76 element.profile = object; |
| 77 return element; | 77 return element; |
| 78 case 'ServiceError': |
| 79 ServiceErrorViewElement element = |
| 80 new Element.tag('service-error-view'); |
| 81 element.error = object; |
| 82 return element; |
| 83 case 'ServiceException': |
| 84 ServiceExceptionViewElement element = |
| 85 new Element.tag('service-exception-view'); |
| 86 element.exception = object; |
| 87 return element; |
| 78 case 'Script': | 88 case 'Script': |
| 79 ScriptViewElement element = new Element.tag('script-view'); | 89 ScriptViewElement element = new Element.tag('script-view'); |
| 80 element.script = object; | 90 element.script = object; |
| 81 return element; | 91 return element; |
| 82 case 'StackTrace': | 92 case 'StackTrace': |
| 83 StackTraceElement element = new Element.tag('stack-trace'); | 93 StackTraceElement element = new Element.tag('stack-trace'); |
| 84 element.trace = object; | 94 element.trace = object; |
| 85 return element; | 95 return element; |
| 86 case 'VM': | 96 case 'VM': |
| 87 VMViewElement element = new Element.tag('vm-view'); | 97 VMViewElement element = new Element.tag('vm-view'); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 102 var type = object.serviceType; | 112 var type = object.serviceType; |
| 103 var element = _constructElementForObject(); | 113 var element = _constructElementForObject(); |
| 104 if (element == null) { | 114 if (element == null) { |
| 105 Logger.root.info('Unable to find a view element for \'${type}\''); | 115 Logger.root.info('Unable to find a view element for \'${type}\''); |
| 106 return; | 116 return; |
| 107 } | 117 } |
| 108 children.add(element); | 118 children.add(element); |
| 109 Logger.root.info('Viewing object of \'${type}\''); | 119 Logger.root.info('Viewing object of \'${type}\''); |
| 110 } | 120 } |
| 111 } | 121 } |
| OLD | NEW |