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

Side by Side Diff: runtime/observatory/lib/src/elements/json_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 library json_view_element; 5 library json_view_element;
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/helpers/nav_bar.dart';
10 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 11 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
11 import 'package:observatory/src/elements/helpers/tag.dart'; 12 import 'package:observatory/src/elements/helpers/tag.dart';
12 import 'package:observatory/src/elements/nav/bar.dart';
13 import 'package:observatory/src/elements/nav/notify.dart'; 13 import 'package:observatory/src/elements/nav/notify.dart';
14 import 'package:observatory/src/elements/nav/top_menu.dart'; 14 import 'package:observatory/src/elements/nav/top_menu.dart';
15 import 'package:observatory/src/elements/view_footer.dart'; 15 import 'package:observatory/src/elements/view_footer.dart';
16 16
17 class JSONViewElement extends HtmlElement implements Renderable { 17 class JSONViewElement extends HtmlElement implements Renderable {
18 static const tag = const Tag<JSONViewElement>('json-view', 18 static const tag = const Tag<JSONViewElement>('json-view',
19 dependencies: const [ 19 dependencies: const [
20 NavBarElement.tag,
21 NavTopMenuElement.tag, 20 NavTopMenuElement.tag,
22 NavNotifyElement.tag, 21 NavNotifyElement.tag,
23 ViewFooterElement.tag 22 ViewFooterElement.tag
24 ]); 23 ]);
25 24
26 RenderingScheduler<JSONViewElement> _r; 25 RenderingScheduler<JSONViewElement> _r;
27 26
28 Stream<RenderedEvent<JSONViewElement>> get onRendered => _r.onRendered; 27 Stream<RenderedEvent<JSONViewElement>> get onRendered => _r.onRendered;
29 28
30 M.NotificationRepository _notifications; 29 M.NotificationRepository _notifications;
(...skipping 25 matching lines...) Expand all
56 55
57 @override 56 @override
58 detached() { 57 detached() {
59 super.detached(); 58 super.detached();
60 _r.disable(notify: true); 59 _r.disable(notify: true);
61 children = []; 60 children = [];
62 } 61 }
63 62
64 void render() { 63 void render() {
65 children = [ 64 children = [
66 new NavBarElement(queue: _r.queue) 65 navBar([
67 ..children = [ 66 new NavTopMenuElement(queue: _r.queue),
68 new NavTopMenuElement(queue: _r.queue), 67 new NavNotifyElement(_notifications, queue: _r.queue)
69 new NavNotifyElement(_notifications, queue: _r.queue) 68 ]),
70 ],
71 new DivElement()..classes = ['content-centered-big'] 69 new DivElement()..classes = ['content-centered-big']
72 ..children = [ 70 ..children = [
73 new HeadingElement.h2()..text = 'Object', 71 new HeadingElement.h2()..text = 'Object',
74 new HRElement(), 72 new HRElement(),
75 new PreElement() 73 new PreElement()
76 ..text = JSONPretty.stringify(_map), 74 ..text = JSONPretty.stringify(_map),
77 new HRElement(), 75 new HRElement(),
78 new ViewFooterElement(queue: _r.queue) 76 new ViewFooterElement(queue: _r.queue)
79 ] 77 ]
80 ]; 78 ];
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 149 }
152 150
153 void _writeIndent(int depth) { 151 void _writeIndent(int depth) {
154 const tab = ' '; // 2 spaces. 152 const tab = ' '; // 2 spaces.
155 _buffer.write(tab * depth); 153 _buffer.write(tab * depth);
156 } 154 }
157 155
158 final _buffer = new StringBuffer(); 156 final _buffer = new StringBuffer();
159 final _seen = new Set(); 157 final _seen = new Set();
160 } 158 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/isolate_view.dart ('k') | runtime/observatory/lib/src/elements/library_ref.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698