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'; |
11 import 'package:observatory/elements.dart'; | 11 import 'package:observatory/elements.dart'; |
12 import 'package:polymer/polymer.dart'; | 12 import 'package:polymer/polymer.dart'; |
13 import 'observatory_element.dart'; | 13 import 'observatory_element.dart'; |
14 | 14 |
15 @CustomTag('service-view') | 15 @CustomTag('service-view') |
16 class ServiceObjectViewElement extends ObservatoryElement { | 16 class ServiceObjectViewElement extends ObservatoryElement { |
17 @published ServiceObject object; | 17 @published ServiceObject object; |
18 @published ObservableMap args; | 18 @published ObservableMap args; |
19 | 19 |
20 ServiceObjectViewElement.created() : super.created(); | 20 ServiceObjectViewElement.created() : super.created(); |
21 | 21 |
22 ObservatoryElement _constructElementForObject() { | 22 ObservatoryElement _constructElementForObject() { |
23 var type = object.type; | 23 var type = object.type; |
24 switch (type) { | 24 switch (type) { |
25 case 'Class': | |
26 ClassViewElement element = new Element.tag('class-view'); | |
27 element.cls = object; | |
28 return element; | |
29 case 'Code': | 25 case 'Code': |
30 CodeViewElement element = new Element.tag('code-view'); | 26 CodeViewElement element = new Element.tag('code-view'); |
31 element.code = object; | 27 element.code = object; |
32 return element; | 28 return element; |
33 case 'Isolate': | 29 case 'Isolate': |
34 IsolateViewElement element = new Element.tag('isolate-view'); | 30 IsolateViewElement element = new Element.tag('isolate-view'); |
35 element.isolate = object; | 31 element.isolate = object; |
36 return element; | 32 return element; |
37 case 'VM': | 33 case 'VM': |
38 VMViewElement element = new Element.tag('vm-view'); | 34 VMViewElement element = new Element.tag('vm-view'); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 104 |
109 dynamic expander() { | 105 dynamic expander() { |
110 return expandEvent; | 106 return expandEvent; |
111 } | 107 } |
112 | 108 |
113 void expandEvent(bool exp, var done) { | 109 void expandEvent(bool exp, var done) { |
114 expand = exp; | 110 expand = exp; |
115 done(); | 111 done(); |
116 } | 112 } |
117 } | 113 } |
OLD | NEW |