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

Unified Diff: runtime/observatory/lib/src/elements/view_footer.dart

Issue 2154413002: Converted Observatory view-footer element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Splitted attached and detached in multiple lines Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/lib/src/elements/view_footer.dart
diff --git a/runtime/observatory/lib/src/elements/view_footer.dart b/runtime/observatory/lib/src/elements/view_footer.dart
index a182511bb93990185d4cd6bb7c896238e3e7b134..7493a7ac7198c0b066ccc1301bbca71ae67867bd 100644
--- a/runtime/observatory/lib/src/elements/view_footer.dart
+++ b/runtime/observatory/lib/src/elements/view_footer.dart
@@ -4,10 +4,50 @@
library view_footer_element;
-import 'package:polymer/polymer.dart';
-import 'observatory_element.dart';
+import 'dart:html';
+import 'dart:async';
+import 'package:observatory/src/elements/helpers/tag.dart';
+import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
-@CustomTag('view-footer')
-class ViewFooterElement extends ObservatoryElement {
- ViewFooterElement.created() : super.created();
+class ViewFooterElement extends HtmlElement implements Renderable {
+ static const tag = const Tag<ViewFooterElement>('view-footer');
+
+ RenderingScheduler _r;
+
+ Stream<RenderedEvent<ViewFooterElement>> get onRendered => _r.onRendered;
+
+ factory ViewFooterElement({RenderingQueue queue}) {
+ ViewFooterElement e = document.createElement(tag.name);
+ e._r = new RenderingScheduler(e, queue: queue);
+ return e;
+ }
+
+ ViewFooterElement.created() : super.created() {
+ // TODO(cbernaschina) remove this when no more needed.
+ _r = new RenderingScheduler(this);
+ }
+
+ @override
+ void attached() {
+ super.attached();
+ _r.enable();
+ }
+
+ @override
+ void detached() {
+ super.detached();
+ _r.disable(notify: true);
+ children = [];
+ }
+
+ void render() {
+ children = [
+ new AnchorElement()
+ ..href = 'https://www.dartlang.org/tools/observatory'
+ ..text = 'View documentation',
+ new AnchorElement()
+ ..href = 'https://github.com/dart-lang/sdk/issues/new?title=Observatory:&amp;body=Observatory%20Feedback'
+ ..text = 'File a bug report'
+ ];
+ }
}
« no previous file with comments | « runtime/observatory/lib/src/elements/service_view.html ('k') | runtime/observatory/lib/src/elements/view_footer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698