Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(990)

Side by Side Diff: runtime/observatory/lib/src/elements/icdata_view.dart

Issue 2345023003: Use dartfmt on Observatory code (Closed)
Patch Set: merge Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 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';
11 import 'package:observatory/src/elements/helpers/nav_menu.dart'; 11 import 'package:observatory/src/elements/helpers/nav_menu.dart';
12 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 12 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
13 import 'package:observatory/src/elements/helpers/tag.dart'; 13 import 'package:observatory/src/elements/helpers/tag.dart';
14 import 'package:observatory/src/elements/nav/isolate_menu.dart'; 14 import 'package:observatory/src/elements/nav/isolate_menu.dart';
15 import 'package:observatory/src/elements/nav/notify.dart'; 15 import 'package:observatory/src/elements/nav/notify.dart';
16 import 'package:observatory/src/elements/nav/refresh.dart'; 16 import 'package:observatory/src/elements/nav/refresh.dart';
17 import 'package:observatory/src/elements/nav/top_menu.dart'; 17 import 'package:observatory/src/elements/nav/top_menu.dart';
18 import 'package:observatory/src/elements/nav/vm_menu.dart'; 18 import 'package:observatory/src/elements/nav/vm_menu.dart';
19 import 'package:observatory/src/elements/object_common.dart'; 19 import 'package:observatory/src/elements/object_common.dart';
20 import 'package:observatory/src/elements/view_footer.dart'; 20 import 'package:observatory/src/elements/view_footer.dart';
21 21
22 class ICDataViewElement extends HtmlElement implements Renderable { 22 class ICDataViewElement extends HtmlElement implements Renderable {
23 static const tag = const Tag<ICDataViewElement>('icdata-view', 23 static const tag =
24 dependencies: const [ 24 const Tag<ICDataViewElement>('icdata-view', dependencies: const [
25 CurlyBlockElement.tag, 25 CurlyBlockElement.tag,
26 NavTopMenuElement.tag, 26 NavTopMenuElement.tag,
27 NavVMMenuElement.tag, 27 NavVMMenuElement.tag,
28 NavIsolateMenuElement.tag, 28 NavIsolateMenuElement.tag,
29 NavRefreshElement.tag, 29 NavRefreshElement.tag,
30 NavNotifyElement.tag, 30 NavNotifyElement.tag,
31 ObjectCommonElement.tag, 31 ObjectCommonElement.tag,
32 ViewFooterElement.tag 32 ViewFooterElement.tag
33 ]); 33 ]);
34 34
35 RenderingScheduler<ICDataViewElement> _r; 35 RenderingScheduler<ICDataViewElement> _r;
36 36
37 Stream<RenderedEvent<ICDataViewElement>> get onRendered => _r.onRendered; 37 Stream<RenderedEvent<ICDataViewElement>> get onRendered => _r.onRendered;
38 38
39 M.VM _vm; 39 M.VM _vm;
40 M.IsolateRef _isolate; 40 M.IsolateRef _isolate;
41 M.EventRepository _events; 41 M.EventRepository _events;
42 M.NotificationRepository _notifications; 42 M.NotificationRepository _notifications;
43 M.ICData _icdata; 43 M.ICData _icdata;
44 M.ICDataRepository _icdatas; 44 M.ICDataRepository _icdatas;
45 M.RetainedSizeRepository _retainedSizes; 45 M.RetainedSizeRepository _retainedSizes;
46 M.ReachableSizeRepository _reachableSizes; 46 M.ReachableSizeRepository _reachableSizes;
47 M.InboundReferencesRepository _references; 47 M.InboundReferencesRepository _references;
48 M.RetainingPathRepository _retainingPaths; 48 M.RetainingPathRepository _retainingPaths;
49 M.InstanceRepository _instances; 49 M.InstanceRepository _instances;
50 50
51
52 M.VMRef get vm => _vm; 51 M.VMRef get vm => _vm;
53 M.IsolateRef get isolate => _isolate; 52 M.IsolateRef get isolate => _isolate;
54 M.NotificationRepository get notifications => _notifications; 53 M.NotificationRepository get notifications => _notifications;
55 M.ICData get icdata => _icdata; 54 M.ICData get icdata => _icdata;
56 55
57 factory ICDataViewElement(M.VM vm, M.IsolateRef isolate, M.ICData icdata, 56 factory ICDataViewElement(
58 M.EventRepository events, 57 M.VM vm,
59 M.NotificationRepository notifications, 58 M.IsolateRef isolate,
60 M.ICDataRepository icdatas, 59 M.ICData icdata,
61 M.RetainedSizeRepository retainedSizes, 60 M.EventRepository events,
62 M.ReachableSizeRepository reachableSizes, 61 M.NotificationRepository notifications,
63 M.InboundReferencesRepository references, 62 M.ICDataRepository icdatas,
64 M.RetainingPathRepository retainingPaths, 63 M.RetainedSizeRepository retainedSizes,
65 M.InstanceRepository instances, 64 M.ReachableSizeRepository reachableSizes,
66 {RenderingQueue queue}) { 65 M.InboundReferencesRepository references,
66 M.RetainingPathRepository retainingPaths,
67 M.InstanceRepository instances,
68 {RenderingQueue queue}) {
67 assert(vm != null); 69 assert(vm != null);
68 assert(isolate != null); 70 assert(isolate != null);
69 assert(events != null); 71 assert(events != null);
70 assert(notifications != null); 72 assert(notifications != null);
71 assert(icdata != null); 73 assert(icdata != null);
72 assert(icdatas != null); 74 assert(icdatas != null);
73 assert(retainedSizes != null); 75 assert(retainedSizes != null);
74 assert(reachableSizes != null); 76 assert(reachableSizes != null);
75 assert(references != null); 77 assert(references != null);
76 assert(retainingPaths != null); 78 assert(retainingPaths != null);
(...skipping 30 matching lines...) Expand all
107 } 109 }
108 110
109 void render() { 111 void render() {
110 children = [ 112 children = [
111 navBar([ 113 navBar([
112 new NavTopMenuElement(queue: _r.queue), 114 new NavTopMenuElement(queue: _r.queue),
113 new NavVMMenuElement(_vm, _events, queue: _r.queue), 115 new NavVMMenuElement(_vm, _events, queue: _r.queue),
114 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), 116 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue),
115 navMenu('icdata'), 117 navMenu('icdata'),
116 new NavRefreshElement(queue: _r.queue) 118 new NavRefreshElement(queue: _r.queue)
117 ..onRefresh.listen((e) async { 119 ..onRefresh.listen((e) async {
118 e.element.disabled = true; 120 e.element.disabled = true;
119 _icdata = await _icdatas.get(_isolate, _icdata.id); 121 _icdata = await _icdatas.get(_isolate, _icdata.id);
120 _r.dirty(); 122 _r.dirty();
121 }), 123 }),
122 new NavNotifyElement(_notifications, queue: _r.queue) 124 new NavNotifyElement(_notifications, queue: _r.queue)
123 ]), 125 ]),
124 new DivElement()..classes = ['content-centered-big'] 126 new DivElement()
127 ..classes = ['content-centered-big']
125 ..children = [ 128 ..children = [
126 new HeadingElement.h2()..text = 'ICData', 129 new HeadingElement.h2()..text = 'ICData',
127 new HRElement(), 130 new HRElement(),
128 new ObjectCommonElement(_isolate, _icdata, _retainedSizes, 131 new ObjectCommonElement(_isolate, _icdata, _retainedSizes,
129 _reachableSizes, _references, _retainingPaths, 132 _reachableSizes, _references, _retainingPaths, _instances,
130 _instances, queue: _r.queue), 133 queue: _r.queue),
131 new DivElement()..classes = ['memberList'] 134 new DivElement()
135 ..classes = ['memberList']
132 ..children = [ 136 ..children = [
133 new DivElement()..classes = ['memberItem'] 137 new DivElement()
138 ..classes = ['memberItem']
134 ..children = [ 139 ..children = [
135 new DivElement()..classes = ['memberName'] 140 new DivElement()
141 ..classes = ['memberName']
136 ..text = 'selector', 142 ..text = 'selector',
137 new DivElement()..classes = ['memberName'] 143 new DivElement()
144 ..classes = ['memberName']
138 ..text = _icdata.selector 145 ..text = _icdata.selector
139 ], 146 ],
140 new DivElement()..classes = ['memberItem'] 147 new DivElement()
148 ..classes = ['memberItem']
141 ..children = [ 149 ..children = [
142 new DivElement()..classes = ['memberName'] 150 new DivElement()
151 ..classes = ['memberName']
143 ..text = 'owner', 152 ..text = 'owner',
144 new DivElement()..classes = ['memberName'] 153 new DivElement()
154 ..classes = ['memberName']
145 ..children = [ 155 ..children = [
146 _icdata.dartOwner == null 156 _icdata.dartOwner == null
147 ? (new SpanElement()..text = '<none>') 157 ? (new SpanElement()..text = '<none>')
148 : anyRef(_isolate, _icdata.dartOwner, _instances, 158 : anyRef(_isolate, _icdata.dartOwner, _instances,
149 queue: _r.queue) 159 queue: _r.queue)
150 ] 160 ]
151 ], 161 ],
152 new DivElement()..classes = ['memberItem'] 162 new DivElement()
163 ..classes = ['memberItem']
153 ..children = [ 164 ..children = [
154 new DivElement()..classes = ['memberName'] 165 new DivElement()
166 ..classes = ['memberName']
155 ..text = 'argumentsDescriptor', 167 ..text = 'argumentsDescriptor',
156 new DivElement()..classes = ['memberName'] 168 new DivElement()
169 ..classes = ['memberName']
157 ..children = [ 170 ..children = [
158 _icdata.argumentsDescriptor == null 171 _icdata.argumentsDescriptor == null
159 ? (new SpanElement()..text = '<none>') 172 ? (new SpanElement()..text = '<none>')
160 : anyRef(_isolate, _icdata.argumentsDescriptor, 173 : anyRef(
161 _instances, queue: _r.queue) 174 _isolate, _icdata.argumentsDescriptor, _instances,
175 queue: _r.queue)
162 ] 176 ]
163 ], 177 ],
164 new DivElement()..classes = ['memberItem'] 178 new DivElement()
179 ..classes = ['memberItem']
165 ..children = [ 180 ..children = [
166 new DivElement()..classes = ['memberName'] 181 new DivElement()
182 ..classes = ['memberName']
167 ..text = 'entries', 183 ..text = 'entries',
168 new DivElement()..classes = ['memberName'] 184 new DivElement()
185 ..classes = ['memberName']
169 ..children = [ 186 ..children = [
170 _icdata.entries == null 187 _icdata.entries == null
171 ? (new SpanElement()..text = '<none>') 188 ? (new SpanElement()..text = '<none>')
172 : anyRef(_isolate, _icdata.entries, _instances, 189 : anyRef(_isolate, _icdata.entries, _instances,
173 queue: _r.queue) 190 queue: _r.queue)
174 ] 191 ]
175 ] 192 ]
176 ], 193 ],
177 new HRElement(), 194 new HRElement(),
178 new ViewFooterElement(queue: _r.queue) 195 new ViewFooterElement(queue: _r.queue)
179 ] 196 ]
180 ]; 197 ];
181 } 198 }
182 } 199 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/icdata_ref.dart ('k') | runtime/observatory/lib/src/elements/inbound_references.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698