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

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

Issue 2310003004: Removed polymer & mirror from Observatory (Closed)
Patch Set: Fixed crash in heap-map page 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';
11 import 'package:observatory/src/elements/helpers/nav_menu.dart';
10 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 12 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
11 import 'package:observatory/src/elements/helpers/tag.dart'; 13 import 'package:observatory/src/elements/helpers/tag.dart';
12 import 'package:observatory/src/elements/nav/bar.dart';
13 import 'package:observatory/src/elements/nav/isolate_menu.dart'; 14 import 'package:observatory/src/elements/nav/isolate_menu.dart';
14 import 'package:observatory/src/elements/nav/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 = const Tag<ICDataViewElement>('icdata-view',
24 dependencies: const [ 24 dependencies: const [
25 CurlyBlockElement.tag, 25 CurlyBlockElement.tag,
26 NavBarElement.tag,
27 NavTopMenuElement.tag, 26 NavTopMenuElement.tag,
28 NavVMMenuElement.tag, 27 NavVMMenuElement.tag,
29 NavIsolateMenuElement.tag, 28 NavIsolateMenuElement.tag,
30 NavMenuElement.tag,
31 NavRefreshElement.tag, 29 NavRefreshElement.tag,
32 NavNotifyElement.tag, 30 NavNotifyElement.tag,
33 ObjectCommonElement.tag, 31 ObjectCommonElement.tag,
34 ViewFooterElement.tag 32 ViewFooterElement.tag
35 ]); 33 ]);
36 34
37 RenderingScheduler<ICDataViewElement> _r; 35 RenderingScheduler<ICDataViewElement> _r;
38 36
39 Stream<RenderedEvent<ICDataViewElement>> get onRendered => _r.onRendered; 37 Stream<RenderedEvent<ICDataViewElement>> get onRendered => _r.onRendered;
40 38
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 101
104 @override 102 @override
105 detached() { 103 detached() {
106 super.detached(); 104 super.detached();
107 _r.disable(notify: true); 105 _r.disable(notify: true);
108 children = []; 106 children = [];
109 } 107 }
110 108
111 void render() { 109 void render() {
112 children = [ 110 children = [
113 new NavBarElement(queue: _r.queue) 111 navBar([
114 ..children = [ 112 new NavTopMenuElement(queue: _r.queue),
115 new NavTopMenuElement(queue: _r.queue), 113 new NavVMMenuElement(_vm, _events, queue: _r.queue),
116 new NavVMMenuElement(_vm, _events, queue: _r.queue), 114 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue),
117 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), 115 navMenu('icdata'),
118 new NavMenuElement('instance', last: true, queue: _r.queue), 116 new NavRefreshElement(queue: _r.queue)
119 new NavRefreshElement(queue: _r.queue) 117 ..onRefresh.listen((e) async {
120 ..onRefresh.listen((e) async { 118 e.element.disabled = true;
121 e.element.disabled = true; 119 _icdata = await _icdatas.get(_isolate, _icdata.id);
122 _icdata = await _icdatas.get(_isolate, _icdata.id); 120 _r.dirty();
123 _r.dirty(); 121 }),
124 }), 122 new NavNotifyElement(_notifications, queue: _r.queue)
125 new NavNotifyElement(_notifications, queue: _r.queue) 123 ]),
126 ],
127
128 new DivElement()..classes = ['content-centered-big'] 124 new DivElement()..classes = ['content-centered-big']
129 ..children = [ 125 ..children = [
130 new HeadingElement.h2()..text = 'ICData', 126 new HeadingElement.h2()..text = 'ICData',
131 new HRElement(), 127 new HRElement(),
132 new ObjectCommonElement(_isolate, _icdata, _retainedSizes, 128 new ObjectCommonElement(_isolate, _icdata, _retainedSizes,
133 _reachableSizes, _references, _retainingPaths, 129 _reachableSizes, _references, _retainingPaths,
134 _instances, queue: _r.queue), 130 _instances, queue: _r.queue),
135 new DivElement()..classes = ['memberList'] 131 new DivElement()..classes = ['memberList']
136 ..children = [ 132 ..children = [
137 new DivElement()..classes = ['memberItem'] 133 new DivElement()..classes = ['memberItem']
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 queue: _r.queue) 166 queue: _r.queue)
171 ] 167 ]
172 ] 168 ]
173 ], 169 ],
174 new HRElement(), 170 new HRElement(),
175 new ViewFooterElement(queue: _r.queue) 171 new ViewFooterElement(queue: _r.queue)
176 ] 172 ]
177 ]; 173 ];
178 } 174 }
179 } 175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698