OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:html'; | 6 import 'dart:html'; |
7 import 'package:observatory/models.dart' as M; | 7 import 'package:observatory/models.dart' as M; |
8 import 'package:observatory/src/elements/curly_block.dart'; | 8 import 'package:observatory/src/elements/curly_block.dart'; |
9 import 'package:observatory/src/elements/helpers/any_ref.dart'; | 9 import 'package:observatory/src/elements/helpers/any_ref.dart'; |
10 import 'package:observatory/src/elements/helpers/nav_bar.dart'; | 10 import 'package:observatory/src/elements/helpers/nav_bar.dart'; |
(...skipping 30 matching lines...) Expand all Loading... |
41 M.VM _vm; | 41 M.VM _vm; |
42 M.IsolateRef _isolate; | 42 M.IsolateRef _isolate; |
43 M.EventRepository _events; | 43 M.EventRepository _events; |
44 M.NotificationRepository _notifications; | 44 M.NotificationRepository _notifications; |
45 M.SingleTargetCache _singleTargetCache; | 45 M.SingleTargetCache _singleTargetCache; |
46 M.SingleTargetCacheRepository _singleTargetCaches; | 46 M.SingleTargetCacheRepository _singleTargetCaches; |
47 M.RetainedSizeRepository _retainedSizes; | 47 M.RetainedSizeRepository _retainedSizes; |
48 M.ReachableSizeRepository _reachableSizes; | 48 M.ReachableSizeRepository _reachableSizes; |
49 M.InboundReferencesRepository _references; | 49 M.InboundReferencesRepository _references; |
50 M.RetainingPathRepository _retainingPaths; | 50 M.RetainingPathRepository _retainingPaths; |
51 M.InstanceRepository _instances; | 51 M.ObjectRepository _objects; |
52 | 52 |
53 M.VMRef get vm => _vm; | 53 M.VMRef get vm => _vm; |
54 M.IsolateRef get isolate => _isolate; | 54 M.IsolateRef get isolate => _isolate; |
55 M.NotificationRepository get notifications => _notifications; | 55 M.NotificationRepository get notifications => _notifications; |
56 M.SingleTargetCache get singleTargetCache => _singleTargetCache; | 56 M.SingleTargetCache get singleTargetCache => _singleTargetCache; |
57 | 57 |
58 factory SingleTargetCacheViewElement( | 58 factory SingleTargetCacheViewElement( |
59 M.VM vm, | 59 M.VM vm, |
60 M.IsolateRef isolate, | 60 M.IsolateRef isolate, |
61 M.SingleTargetCache singleTargetCache, | 61 M.SingleTargetCache singleTargetCache, |
62 M.EventRepository events, | 62 M.EventRepository events, |
63 M.NotificationRepository notifications, | 63 M.NotificationRepository notifications, |
64 M.SingleTargetCacheRepository singleTargetCaches, | 64 M.SingleTargetCacheRepository singleTargetCaches, |
65 M.RetainedSizeRepository retainedSizes, | 65 M.RetainedSizeRepository retainedSizes, |
66 M.ReachableSizeRepository reachableSizes, | 66 M.ReachableSizeRepository reachableSizes, |
67 M.InboundReferencesRepository references, | 67 M.InboundReferencesRepository references, |
68 M.RetainingPathRepository retainingPaths, | 68 M.RetainingPathRepository retainingPaths, |
69 M.InstanceRepository instances, | 69 M.ObjectRepository objects, |
70 {RenderingQueue queue}) { | 70 {RenderingQueue queue}) { |
71 assert(vm != null); | 71 assert(vm != null); |
72 assert(isolate != null); | 72 assert(isolate != null); |
73 assert(events != null); | 73 assert(events != null); |
74 assert(notifications != null); | 74 assert(notifications != null); |
75 assert(singleTargetCache != null); | 75 assert(singleTargetCache != null); |
76 assert(singleTargetCaches != null); | 76 assert(singleTargetCaches != null); |
77 assert(retainedSizes != null); | 77 assert(retainedSizes != null); |
78 assert(reachableSizes != null); | 78 assert(reachableSizes != null); |
79 assert(references != null); | 79 assert(references != null); |
80 assert(retainingPaths != null); | 80 assert(retainingPaths != null); |
81 assert(instances != null); | 81 assert(objects != null); |
82 SingleTargetCacheViewElement e = document.createElement(tag.name); | 82 SingleTargetCacheViewElement e = document.createElement(tag.name); |
83 e._r = new RenderingScheduler(e, queue: queue); | 83 e._r = new RenderingScheduler(e, queue: queue); |
84 e._vm = vm; | 84 e._vm = vm; |
85 e._isolate = isolate; | 85 e._isolate = isolate; |
86 e._events = events; | 86 e._events = events; |
87 e._notifications = notifications; | 87 e._notifications = notifications; |
88 e._singleTargetCache = singleTargetCache; | 88 e._singleTargetCache = singleTargetCache; |
89 e._singleTargetCaches = singleTargetCaches; | 89 e._singleTargetCaches = singleTargetCaches; |
90 e._retainedSizes = retainedSizes; | 90 e._retainedSizes = retainedSizes; |
91 e._reachableSizes = reachableSizes; | 91 e._reachableSizes = reachableSizes; |
92 e._references = references; | 92 e._references = references; |
93 e._retainingPaths = retainingPaths; | 93 e._retainingPaths = retainingPaths; |
94 e._instances = instances; | 94 e._objects = objects; |
95 return e; | 95 return e; |
96 } | 96 } |
97 | 97 |
98 SingleTargetCacheViewElement.created() : super.created(); | 98 SingleTargetCacheViewElement.created() : super.created(); |
99 | 99 |
100 @override | 100 @override |
101 attached() { | 101 attached() { |
102 super.attached(); | 102 super.attached(); |
103 _r.enable(); | 103 _r.enable(); |
104 } | 104 } |
(...skipping 20 matching lines...) Expand all Loading... |
125 _r.dirty(); | 125 _r.dirty(); |
126 }), | 126 }), |
127 new NavNotifyElement(_notifications, queue: _r.queue) | 127 new NavNotifyElement(_notifications, queue: _r.queue) |
128 ]), | 128 ]), |
129 new DivElement() | 129 new DivElement() |
130 ..classes = ['content-centered-big'] | 130 ..classes = ['content-centered-big'] |
131 ..children = [ | 131 ..children = [ |
132 new HeadingElement.h2()..text = 'SingleTargetCache', | 132 new HeadingElement.h2()..text = 'SingleTargetCache', |
133 new HRElement(), | 133 new HRElement(), |
134 new ObjectCommonElement(_isolate, _singleTargetCache, _retainedSizes, | 134 new ObjectCommonElement(_isolate, _singleTargetCache, _retainedSizes, |
135 _reachableSizes, _references, _retainingPaths, _instances, | 135 _reachableSizes, _references, _retainingPaths, _objects, |
136 queue: _r.queue), | 136 queue: _r.queue), |
137 new DivElement() | 137 new DivElement() |
138 ..classes = ['memberList'] | 138 ..classes = ['memberList'] |
139 ..children = [ | 139 ..children = [ |
140 new DivElement() | 140 new DivElement() |
141 ..classes = ['memberItem'] | 141 ..classes = ['memberItem'] |
142 ..children = [ | 142 ..children = [ |
143 new DivElement() | 143 new DivElement() |
144 ..classes = ['memberName'] | 144 ..classes = ['memberName'] |
145 ..text = 'target', | 145 ..text = 'target', |
146 new DivElement() | 146 new DivElement() |
147 ..classes = ['memberName'] | 147 ..classes = ['memberName'] |
148 ..children = [ | 148 ..children = [ |
149 anyRef(_isolate, _singleTargetCache.target, _instances, | 149 anyRef(_isolate, _singleTargetCache.target, _objects, |
150 queue: _r.queue) | 150 queue: _r.queue) |
151 ] | 151 ] |
152 ], | 152 ], |
153 new DivElement() | 153 new DivElement() |
154 ..classes = ['memberItem'] | 154 ..classes = ['memberItem'] |
155 ..children = [ | 155 ..children = [ |
156 new DivElement() | 156 new DivElement() |
157 ..classes = ['memberName'] | 157 ..classes = ['memberName'] |
158 ..text = 'lowerLimit', | 158 ..text = 'lowerLimit', |
159 new DivElement() | 159 new DivElement() |
(...skipping 16 matching lines...) Expand all Loading... |
176 ..text = _singleTargetCache.upperLimit.toString() | 176 ..text = _singleTargetCache.upperLimit.toString() |
177 ] | 177 ] |
178 ] | 178 ] |
179 ], | 179 ], |
180 new HRElement(), | 180 new HRElement(), |
181 new ViewFooterElement(queue: _r.queue) | 181 new ViewFooterElement(queue: _r.queue) |
182 ] | 182 ] |
183 ]; | 183 ]; |
184 } | 184 } |
185 } | 185 } |
OLD | NEW |