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

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

Issue 2184873002: Removed dynamic Symbol creation and marked Bindable classes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 6
7 import 'package:observatory/app.dart'; 7 import 'package:observatory/app.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/shims/binding.dart'; 9 import 'package:observatory/src/elements/shims/binding.dart';
10 import 'package:observatory/src/elements/nav/menu.dart'; 10 import 'package:observatory/src/elements/nav/menu.dart';
11 11
12 @bindable
12 class NavMenuElementWrapper extends HtmlElement { 13 class NavMenuElementWrapper extends HtmlElement {
13 static final binder = new Binder<NavMenuElementWrapper>( 14 static const binder = const Binder<NavMenuElementWrapper>(const {
14 const [const Binding('anchor'), const Binding('link'), 15 'anchor': #anchor, 'link': #link, 'last': #last
15 const Binding('last')]); 16 });
16 17
17 static const tag = 18 static const tag =
18 const Tag<NavMenuElementWrapper>('nav-menu'); 19 const Tag<NavMenuElementWrapper>('nav-menu');
19 20
20 String _anchor = '---'; 21 String _anchor = '---';
21 String _link; 22 String _link;
22 bool _last = false; 23 bool _last = false;
23 String get anchor => _anchor; 24 String get anchor => _anchor;
24 String get link => _link; 25 String get link => _link;
25 bool get last => _last; 26 bool get last => _last;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 queue: ObservatoryApplication.app.queue) 58 queue: ObservatoryApplication.app.queue)
58 ..children = [new ContentElement()] 59 ..children = [new ContentElement()]
59 ]; 60 ];
60 } 61 }
61 62
62 bool _getBoolAttribute(String name) { 63 bool _getBoolAttribute(String name) {
63 final String value = getAttribute(name); 64 final String value = getAttribute(name);
64 return !(value == null || value == 'false'); 65 return !(value == null || value == 'false');
65 } 66 }
66 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698