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

Side by Side 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: 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 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 view_footer_element; 5 library view_footer_element;
6 6
7 import 'package:polymer/polymer.dart'; 7 import 'dart:html';
8 import 'observatory_element.dart'; 8 import 'dart:async';
9 import 'package:observatory/src/elements/helpers/tag.dart';
10 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
9 11
10 @CustomTag('view-footer') 12 class ViewFooterElement extends HtmlElement implements Renderable {
11 class ViewFooterElement extends ObservatoryElement { 13 static const tag = const Tag<ViewFooterElement>('view-footer');
12 ViewFooterElement.created() : super.created(); 14
15 RenderingScheduler _r;
16
17 Stream<RenderedEvent<ViewFooterElement>> get onRendered => _r.onRendered;
18
19 factory ViewFooterElement({RenderingQueue queue}) {
20 ViewFooterElement e = document.createElement(tag.name);
21 e._r = new RenderingScheduler(e, queue: queue);
22 return e;
23 }
24
25 ViewFooterElement.created() : super.created() {
26 // TODO(cbernaschina) remove this when no more needed.
27 _r = new RenderingScheduler(this);
28 }
29
30 @override
31 void attached() { super.attached(); _r.enable(); }
rmacnak 2016/07/18 23:19:16 split to multiple lines
cbernaschina 2016/07/18 23:22:36 Done.
32
33 @override
34 void detached() { super.detached(); _r.disable(notify: true); children = []; }
rmacnak 2016/07/18 23:19:16 split to multiple lines
cbernaschina 2016/07/18 23:22:36 Done.
35
36 void render() {
37 children = [
38 new AnchorElement()
39 ..href = 'https://www.dartlang.org/tools/observatory'
40 ..text = 'View documentation',
41 new AnchorElement()
42 ..href = 'https://github.com/dart-lang/sdk/issues/new?title=Observator y:&amp;body=Observatory%20Feedback'
43 ..text = 'File a bug report'
44 ];
45 }
13 } 46 }
OLDNEW
« 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