OLD | NEW |
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 import 'dart:html'; | 5 import 'dart:html'; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; | 7 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; |
8 import 'package:observatory/src/elements/helpers/tag.dart'; | 8 import 'package:observatory/src/elements/helpers/tag.dart'; |
9 import 'package:observatory/src/elements/helpers/uris.dart'; | 9 import 'package:observatory/src/elements/helpers/uris.dart'; |
10 import 'package:observatory/models.dart' show ConnectionException; | 10 import 'package:observatory/models.dart' show ConnectionException; |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 Stream<RenderedEvent<NavNotifyExceptionElement>> get onRendered => | 25 Stream<RenderedEvent<NavNotifyExceptionElement>> get onRendered => |
26 _r.onRendered; | 26 _r.onRendered; |
27 | 27 |
28 final StreamController<ExceptionDeleteEvent> _onDelete = | 28 final StreamController<ExceptionDeleteEvent> _onDelete = |
29 new StreamController<ExceptionDeleteEvent>.broadcast(); | 29 new StreamController<ExceptionDeleteEvent>.broadcast(); |
30 Stream<ExceptionDeleteEvent> get onDelete => _onDelete.stream; | 30 Stream<ExceptionDeleteEvent> get onDelete => _onDelete.stream; |
31 | 31 |
32 Exception _exception; | 32 Exception _exception; |
33 StackTrace _stacktrace; | 33 StackTrace _stacktrace; |
| 34 |
34 Exception get exception => _exception; | 35 Exception get exception => _exception; |
35 StackTrace get stacktrace => _stacktrace; | 36 StackTrace get stacktrace => _stacktrace; |
36 | 37 |
37 factory NavNotifyExceptionElement(Exception exception, | 38 factory NavNotifyExceptionElement(Exception exception, |
38 {StackTrace stacktrace: null, RenderingQueue queue}) { | 39 {StackTrace stacktrace: null, RenderingQueue queue}) { |
39 assert(exception != null); | 40 assert(exception != null); |
40 NavNotifyExceptionElement e = document.createElement(tag.name); | 41 NavNotifyExceptionElement e = document.createElement(tag.name); |
41 e._r = new RenderingScheduler(e, queue: queue); | 42 e._r = new RenderingScheduler(e, queue: queue); |
42 e._exception = exception; | 43 e._exception = exception; |
43 e._stacktrace = stacktrace; | 44 e._stacktrace = stacktrace; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 } | 120 } |
120 | 121 |
121 void _delete(ExceptionDeleteEvent e) { | 122 void _delete(ExceptionDeleteEvent e) { |
122 _onDelete.add(e); | 123 _onDelete.add(e); |
123 } | 124 } |
124 | 125 |
125 void delete() { | 126 void delete() { |
126 _onDelete.add(new ExceptionDeleteEvent(exception, stacktrace: stacktrace)); | 127 _onDelete.add(new ExceptionDeleteEvent(exception, stacktrace: stacktrace)); |
127 } | 128 } |
128 } | 129 } |
OLD | NEW |