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

Side by Side Diff: runtime/observatory/lib/src/elements/error_ref.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 error_ref_element; 5 library error_ref_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:async'; 8 import 'dart:async';
9 import 'package:observatory/models.dart' 9 import 'package:observatory/models.dart'
10 show ErrorRef; 10 show ErrorRef;
11 import 'package:observatory/src/elements/helpers/tag.dart'; 11 import 'package:observatory/src/elements/helpers/tag.dart';
12 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 12 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
13 13
14 class ErrorRefElement extends HtmlElement implements Renderable { 14 class ErrorRefElement extends HtmlElement implements Renderable {
15 static const tag = const Tag<ErrorRefElement>('error-ref-wrapped'); 15 static const tag = const Tag<ErrorRefElement>('error-ref');
16 16
17 RenderingScheduler<ErrorRefElement> _r; 17 RenderingScheduler<ErrorRefElement> _r;
18 18
19 Stream<RenderedEvent<ErrorRefElement>> get onRendered => _r.onRendered; 19 Stream<RenderedEvent<ErrorRefElement>> get onRendered => _r.onRendered;
20 20
21 ErrorRef _error; 21 ErrorRef _error;
22 22
23 ErrorRef get error => _error; 23 ErrorRef get error => _error;
24 24
25 factory ErrorRefElement(ErrorRef error, {RenderingQueue queue}) { 25 factory ErrorRefElement(ErrorRef error, {RenderingQueue queue}) {
26 assert(error != null); 26 assert(error != null);
27 ErrorRefElement e = document.createElement(tag.name); 27 ErrorRefElement e = document.createElement(tag.name);
28 e._r = new RenderingScheduler<ErrorRefElement>(e, queue: queue); 28 e._r = new RenderingScheduler<ErrorRefElement>(e, queue: queue);
29 e._error = error; 29 e._error = error;
30 return e; 30 return e;
31 } 31 }
32 32
(...skipping 11 matching lines...) Expand all
44 children = []; 44 children = [];
45 _r.disable(notify: true); 45 _r.disable(notify: true);
46 } 46 }
47 47
48 void render() { 48 void render() {
49 children = [ 49 children = [
50 new PreElement()..text = error.message 50 new PreElement()..text = error.message
51 ]; 51 ];
52 } 52 }
53 } 53 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/debugger.dart ('k') | runtime/observatory/lib/src/elements/error_ref_wrapper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698