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

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

Issue 2173613002: Converted Observatory nav-bar 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 nav_bar_element; 5 library nav_bar_element;
6 6
7 import 'dart:html' hide Notification; 7 import 'dart:html' hide Notification;
8 import 'observatory_element.dart'; 8 import 'observatory_element.dart';
9 import 'package:observatory/service.dart'; 9 import 'package:observatory/service.dart';
10 import 'package:observatory/app.dart' show Notification; 10 import 'package:observatory/app.dart' show Notification;
11 import 'package:polymer/polymer.dart'; 11 import 'package:polymer/polymer.dart';
12 12
13
14 @CustomTag('nav-bar')
15 class NavBarElement extends ObservatoryElement {
16 @published bool pad = true;
17
18 // Desired nav var height in pixels.
19 static const height = 40;
20
21 NavBarElement.created() : super.created();
22 }
23
24 @CustomTag('vm-nav-menu') 13 @CustomTag('vm-nav-menu')
25 class VMNavMenuElement extends ObservatoryElement { 14 class VMNavMenuElement extends ObservatoryElement {
26 @published bool last = false; 15 @published bool last = false;
27 @published VM vm; 16 @published VM vm;
28 17
29 String nameAndAddress(name, target) { 18 String nameAndAddress(name, target) {
30 if (name != null && target != null) { 19 if (name != null && target != null) {
31 return '${name}@${target.networkAddress}'; 20 return '${name}@${target.networkAddress}';
32 } else { 21 } else {
33 return '<initializing>'; 22 return '<initializing>';
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 @observable get isUnexpectedError { 91 @observable get isUnexpectedError {
103 return (exception is! NetworkRpcException); 92 return (exception is! NetworkRpcException);
104 } 93 }
105 94
106 void closeItem(MouseEvent e, var detail, Element target) { 95 void closeItem(MouseEvent e, var detail, Element target) {
107 notifications.remove(notification); 96 notifications.remove(notification);
108 } 97 }
109 98
110 NavNotifyExceptionElement.created() : super.created(); 99 NavNotifyExceptionElement.created() : super.created();
111 } 100 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/nav/bar.dart ('k') | runtime/observatory/lib/src/elements/nav_bar.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698