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

Side by Side Diff: runtime/observatory/lib/src/elements/nav/top_menu.dart

Issue 2345023003: Use dartfmt on Observatory code (Closed)
Patch Set: merge 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 import 'dart:html'; 5 import 'dart:html';
6 import 'dart:async'; 6 import 'dart:async';
7 import 'package:observatory/src/elements/helpers/nav_menu.dart'; 7 import 'package:observatory/src/elements/helpers/nav_menu.dart';
8 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 8 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
9 import 'package:observatory/src/elements/helpers/tag.dart'; 9 import 'package:observatory/src/elements/helpers/tag.dart';
10 import 'package:observatory/src/elements/helpers/uris.dart'; 10 import 'package:observatory/src/elements/helpers/uris.dart';
11 import 'package:observatory/src/elements/nav/menu_item.dart'; 11 import 'package:observatory/src/elements/nav/menu_item.dart';
12 12
13 class NavTopMenuElement extends HtmlElement implements Renderable { 13 class NavTopMenuElement extends HtmlElement implements Renderable {
14 static const tag = const Tag<NavTopMenuElement>('nav-top-menu', 14 static const tag = const Tag<NavTopMenuElement>('nav-top-menu',
15 dependencies: const [NavMenuItemElement.tag]); 15 dependencies: const [NavMenuItemElement.tag]);
16 16
17 RenderingScheduler _r; 17 RenderingScheduler _r;
18 18
19 Stream<RenderedEvent<NavTopMenuElement>> get onRendered => _r.onRendered; 19 Stream<RenderedEvent<NavTopMenuElement>> get onRendered => _r.onRendered;
20 20
21 Iterable<Element> _content = const []; 21 Iterable<Element> _content = const [];
22 22
23 Iterable<Element> get content => _content; 23 Iterable<Element> get content => _content;
24 24
25 set content(Iterable<Element> value) { 25 set content(Iterable<Element> value) {
(...skipping 19 matching lines...) Expand all
45 void detached() { 45 void detached() {
46 super.detached(); 46 super.detached();
47 _r.disable(notify: true); 47 _r.disable(notify: true);
48 children = []; 48 children = [];
49 } 49 }
50 50
51 void render() { 51 void render() {
52 final content = ([ 52 final content = ([
53 new NavMenuItemElement('Connect to a VM', link: Uris.vmConnect()), 53 new NavMenuItemElement('Connect to a VM', link: Uris.vmConnect()),
54 ]..addAll(_content)); 54 ]..addAll(_content));
55 children = [ 55 children = [navMenu('Observatory', link: Uris.vm(), content: content)];
56 navMenu('Observatory', link: Uris.vm(), content: content)
57 ];
58 } 56 }
59 } 57 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/nav/refresh.dart ('k') | runtime/observatory/lib/src/elements/nav/vm_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698