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

Side by Side Diff: runtime/observatory/lib/src/elements/nav/top_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/top_menu.dart'; 10 import 'package:observatory/src/elements/nav/top_menu.dart';
11 11
12 @bindable
12 class NavTopMenuElementWrapper extends HtmlElement { 13 class NavTopMenuElementWrapper extends HtmlElement {
13 static final binder = new Binder<NavTopMenuElementWrapper>( 14 static const binder = const Binder<NavTopMenuElementWrapper>(const {
14 const [const Binding('last')]); 15 'last': #last
16 });
15 17
16 static const tag = const Tag<NavTopMenuElementWrapper>('top-nav-menu'); 18 static const tag = const Tag<NavTopMenuElementWrapper>('top-nav-menu');
17 19
18 bool _last = false; 20 bool _last = false;
19 bool get last => _last; 21 bool get last => _last;
20 set last(bool value) { 22 set last(bool value) {
21 _last = value; render(); 23 _last = value; render();
22 } 24 }
23 25
24 NavTopMenuElementWrapper.created() : super.created() { 26 NavTopMenuElementWrapper.created() : super.created() {
(...skipping 17 matching lines...) Expand all
42 new NavTopMenuElement(last: last, queue: ObservatoryApplication.app.queue) 44 new NavTopMenuElement(last: last, queue: ObservatoryApplication.app.queue)
43 ..children = [new ContentElement()] 45 ..children = [new ContentElement()]
44 ]; 46 ];
45 } 47 }
46 48
47 bool _getBoolAttribute(String name) { 49 bool _getBoolAttribute(String name) {
48 final String value = getAttribute(name); 50 final String value = getAttribute(name);
49 return !(value == null || value == 'false'); 51 return !(value == null || value == 'false');
50 } 52 }
51 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698