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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/elements/nav_bar.dart

Issue 308673012: Redo LocationManager to use HTML5 History API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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'; 7 import 'dart:html';
8 import 'observatory_element.dart'; 8 import 'observatory_element.dart';
9 import 'package:observatory/app.dart';
9 import 'package:observatory/service.dart'; 10 import 'package:observatory/service.dart';
10 import 'package:polymer/polymer.dart'; 11 import 'package:polymer/polymer.dart';
11 12
12 13
13 @CustomTag('nav-bar') 14 @CustomTag('nav-bar')
14 class NavBarElement extends ObservatoryElement { 15 class NavBarElement extends ObservatoryElement {
15 @published bool pad = true; 16 @published bool pad = true;
16 17
17 NavBarElement.created() : super.created(); 18 NavBarElement.created() : super.created();
18 } 19 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 if (callback != null) { 51 if (callback != null) {
51 callback(refreshDone); 52 callback(refreshDone);
52 } 53 }
53 } 54 }
54 55
55 void refreshDone() { 56 void refreshDone() {
56 active = false; 57 active = false;
57 } 58 }
58 } 59 }
59 60
61 @CustomTag('nav-control')
62 class NavControlElement extends ObservatoryElement {
63 NavControlElement.created() : super.created();
64
65 void forward(Event e, var detail, Element target) {
66 location.forward();
67 }
68
69 void back(Event e, var detail, Element target) {
70 location.back();
71 }
72 }
73
60 @CustomTag('top-nav-menu') 74 @CustomTag('top-nav-menu')
61 class TopNavMenuElement extends ObservatoryElement { 75 class TopNavMenuElement extends ObservatoryElement {
62 @published bool last = false; 76 @published bool last = false;
63 77
64 TopNavMenuElement.created() : super.created(); 78 TopNavMenuElement.created() : super.created();
65 } 79 }
66 80
67 @CustomTag('isolate-nav-menu') 81 @CustomTag('isolate-nav-menu')
68 class IsolateNavMenuElement extends ObservatoryElement { 82 class IsolateNavMenuElement extends ObservatoryElement {
69 @published bool last = false; 83 @published bool last = false;
70 @published Isolate isolate; 84 @published Isolate isolate;
71 85
72 void isolateChanged(oldValue) { 86 void isolateChanged(oldValue) {
73 notifyPropertyChange(#hashLinkWorkaround, 0, 1); 87 notifyPropertyChange(#hashLinkWorkaround, 0, 1);
74 } 88 }
75 89
76 // TODO(turnidge): Figure out why polymer needs this function. 90 // TODO(turnidge): Figure out why polymer needs this function.
77 @reflectable 91 @reflectable
78 String get hashLinkWorkaround { 92 String get hashLinkWorkaround {
79 if (isolate != null) { 93 if (isolate != null) {
80 return isolate.hashLink; 94 return isolate.link;
81 } else { 95 } else {
82 return ''; 96 return '';
83 } 97 }
84 } 98 }
85 @reflectable set hashLinkWorkaround(var x) { /* silence polymer */ } 99 @reflectable set hashLinkWorkaround(var x) { /* silence polymer */ }
86 100
87 IsolateNavMenuElement.created() : super.created(); 101 IsolateNavMenuElement.created() : super.created();
88 } 102 }
89 103
90 @CustomTag('library-nav-menu') 104 @CustomTag('library-nav-menu')
91 class LibraryNavMenuElement extends ObservatoryElement { 105 class LibraryNavMenuElement extends ObservatoryElement {
92 @published Library library; 106 @published Library library;
93 @published bool last = false; 107 @published bool last = false;
94 108
95 LibraryNavMenuElement.created() : super.created(); 109 LibraryNavMenuElement.created() : super.created();
96 } 110 }
97 111
98 @CustomTag('class-nav-menu') 112 @CustomTag('class-nav-menu')
99 class ClassNavMenuElement extends ObservatoryElement { 113 class ClassNavMenuElement extends ObservatoryElement {
100 @published ServiceMap cls; 114 @published ServiceMap cls;
101 @published bool last = false; 115 @published bool last = false;
102 116
103 ClassNavMenuElement.created() : super.created(); 117 ClassNavMenuElement.created() : super.created();
104 } 118 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698