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

Side by Side Diff: runtime/observatory/lib/src/elements/megamorphiccache_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 megamorphiccache_view; 5 library megamorphiccache_view;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:observatory/models.dart' as M; 9 import 'package:observatory/models.dart' as M;
10 import 'package:observatory/src/elements/context_ref.dart'; 10 import 'package:observatory/src/elements/context_ref.dart';
11 import 'package:observatory/src/elements/curly_block.dart'; 11 import 'package:observatory/src/elements/curly_block.dart';
12 import 'package:observatory/src/elements/helpers/any_ref.dart'; 12 import 'package:observatory/src/elements/helpers/any_ref.dart';
13 import 'package:observatory/src/elements/helpers/nav_bar.dart';
14 import 'package:observatory/src/elements/helpers/nav_menu.dart';
13 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 15 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
14 import 'package:observatory/src/elements/helpers/tag.dart'; 16 import 'package:observatory/src/elements/helpers/tag.dart';
15 import 'package:observatory/src/elements/nav/bar.dart';
16 import 'package:observatory/src/elements/nav/isolate_menu.dart'; 17 import 'package:observatory/src/elements/nav/isolate_menu.dart';
17 import 'package:observatory/src/elements/nav/menu.dart';
18 import 'package:observatory/src/elements/nav/notify.dart'; 18 import 'package:observatory/src/elements/nav/notify.dart';
19 import 'package:observatory/src/elements/nav/refresh.dart'; 19 import 'package:observatory/src/elements/nav/refresh.dart';
20 import 'package:observatory/src/elements/nav/top_menu.dart'; 20 import 'package:observatory/src/elements/nav/top_menu.dart';
21 import 'package:observatory/src/elements/nav/vm_menu.dart'; 21 import 'package:observatory/src/elements/nav/vm_menu.dart';
22 import 'package:observatory/src/elements/object_common.dart'; 22 import 'package:observatory/src/elements/object_common.dart';
23 import 'package:observatory/src/elements/view_footer.dart'; 23 import 'package:observatory/src/elements/view_footer.dart';
24 24
25 class MegamorphicCacheViewElement extends HtmlElement implements Renderable { 25 class MegamorphicCacheViewElement extends HtmlElement implements Renderable {
26 static const tag = 26 static const tag =
27 const Tag<MegamorphicCacheViewElement>('megamorphiccache-view', 27 const Tag<MegamorphicCacheViewElement>('megamorphiccache-view',
28 dependencies: const [ 28 dependencies: const [
29 ContextRefElement.tag, 29 ContextRefElement.tag,
30 CurlyBlockElement.tag, 30 CurlyBlockElement.tag,
31 NavBarElement.tag,
32 NavTopMenuElement.tag, 31 NavTopMenuElement.tag,
33 NavVMMenuElement.tag, 32 NavVMMenuElement.tag,
34 NavIsolateMenuElement.tag, 33 NavIsolateMenuElement.tag,
35 NavMenuElement.tag,
36 NavRefreshElement.tag, 34 NavRefreshElement.tag,
37 NavNotifyElement.tag, 35 NavNotifyElement.tag,
38 ObjectCommonElement.tag, 36 ObjectCommonElement.tag,
39 ViewFooterElement.tag 37 ViewFooterElement.tag
40 ]); 38 ]);
41 39
42 RenderingScheduler<MegamorphicCacheViewElement> _r; 40 RenderingScheduler<MegamorphicCacheViewElement> _r;
43 41
44 Stream<RenderedEvent<MegamorphicCacheViewElement>> get onRendered => 42 Stream<RenderedEvent<MegamorphicCacheViewElement>> get onRendered =>
45 _r.onRendered; 43 _r.onRendered;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 108
111 @override 109 @override
112 detached() { 110 detached() {
113 super.detached(); 111 super.detached();
114 _r.disable(notify: true); 112 _r.disable(notify: true);
115 children = []; 113 children = [];
116 } 114 }
117 115
118 void render() { 116 void render() {
119 children = [ 117 children = [
120 new NavBarElement(queue: _r.queue) 118 navBar([
121 ..children = [ 119 new NavTopMenuElement(queue: _r.queue),
122 new NavTopMenuElement(queue: _r.queue), 120 new NavVMMenuElement(_vm, _events, queue: _r.queue),
123 new NavVMMenuElement(_vm, _events, queue: _r.queue), 121 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue),
124 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue), 122 navMenu('megamorphic inline cache'),
125 new NavMenuElement('object', last: true, queue: _r.queue), 123 new NavRefreshElement(queue: _r.queue)
126 new NavRefreshElement(queue: _r.queue) 124 ..onRefresh.listen((e) async {
127 ..onRefresh.listen((e) async { 125 e.element.disabled = true;
128 e.element.disabled = true; 126 _cache = await _caches.get(_isolate, _cache.id);
129 _cache = await _caches.get(_isolate, _cache.id); 127 _r.dirty();
130 _r.dirty(); 128 }),
131 }), 129 new NavNotifyElement(_notifications, queue: _r.queue)
132 new NavNotifyElement(_notifications, queue: _r.queue) 130 ]),
133 ],
134 new DivElement()..classes = ['content-centered-big'] 131 new DivElement()..classes = ['content-centered-big']
135 ..children = [ 132 ..children = [
136 new HeadingElement.h2()..text = 'Megamorphic Cache', 133 new HeadingElement.h2()..text = 'Megamorphic Cache',
137 new HRElement(), 134 new HRElement(),
138 new ObjectCommonElement(_isolate, _cache, _retainedSizes, 135 new ObjectCommonElement(_isolate, _cache, _retainedSizes,
139 _reachableSizes, _references, _retainingPaths, 136 _reachableSizes, _references, _retainingPaths,
140 _instances, queue: _r.queue), 137 _instances, queue: _r.queue),
141 new BRElement(), 138 new BRElement(),
142 new DivElement()..classes = ['memberList'] 139 new DivElement()..classes = ['memberList']
143 ..children = [ 140 ..children = [
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 queue: _r.queue) 172 queue: _r.queue)
176 ] 173 ]
177 ] 174 ]
178 ], 175 ],
179 new HRElement(), 176 new HRElement(),
180 new ViewFooterElement(queue: _r.queue) 177 new ViewFooterElement(queue: _r.queue)
181 ] 178 ]
182 ]; 179 ];
183 } 180 }
184 } 181 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/megamorphiccache_ref.dart ('k') | runtime/observatory/lib/src/elements/metrics.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698