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

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

Issue 2996353002: Restyle Observatory Memory Dashboard buttons (Closed)
Patch Set: Better layout Created 3 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
« no previous file with comments | « runtime/observatory/lib/src/elements/memory/allocations.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 /// This Element is part of MemoryDashboardElement. 5 /// This Element is part of MemoryDashboardElement.
6 /// 6 ///
7 /// The Element is stripped down version of AllocationProfileElement where 7 /// The Element is stripped down version of AllocationProfileElement where
8 /// concepts like old and new space has been hidden away. 8 /// concepts like old and new space has been hidden away.
9 /// 9 ///
10 /// For each class in the system it is shown the Total number of instances 10 /// For each class in the system it is shown the Total number of instances
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 final ButtonElement bReload = new ButtonElement(); 109 final ButtonElement bReload = new ButtonElement();
110 final ButtonElement bGC = new ButtonElement(); 110 final ButtonElement bGC = new ButtonElement();
111 children = [ 111 children = [
112 new DivElement() 112 new DivElement()
113 ..classes = ['content-centered-big'] 113 ..classes = ['content-centered-big']
114 ..children = [ 114 ..children = [
115 new HeadingElement.h1() 115 new HeadingElement.h1()
116 ..children = [ 116 ..children = [
117 new Text("Isolate ${_isolate.name}"), 117 new Text("Isolate ${_isolate.name}"),
118 bReload 118 bReload
119 ..classes = ['link', 'big'] 119 ..classes = ['header_button']
120 ..text = ' ↺ ' 120 ..text = ' ↺ Refresh'
121 ..title = 'Refresh' 121 ..title = 'Refresh'
122 ..onClick.listen((e) async { 122 ..onClick.listen((e) async {
123 bReload.disabled = true; 123 bReload.disabled = true;
124 bGC.disabled = true; 124 bGC.disabled = true;
125 await reload(); 125 await reload();
126 bReload.disabled = false; 126 bReload.disabled = false;
127 bGC.disabled = false; 127 bGC.disabled = false;
128 }), 128 }),
129 bGC 129 bGC
130 ..classes = ['link', 'big'] 130 ..classes = ['header_button']
131 ..text = ' ♺ ' 131 ..text = ' ♺ Collect Garbage'
132 ..title = 'Collect Garbage' 132 ..title = 'Collect Garbage'
133 ..onClick.listen((e) async { 133 ..onClick.listen((e) async {
134 bGC.disabled = true; 134 bGC.disabled = true;
135 bReload.disabled = true; 135 bReload.disabled = true;
136 await reload(gc: true); 136 await reload(gc: true);
137 bGC.disabled = false; 137 bGC.disabled = false;
138 bReload.disabled = false; 138 bReload.disabled = false;
139 }), 139 }),
140 new ButtonElement() 140 new SpanElement()
141 ..classes = ['tab_button'] 141 ..classes = ['tab_buttons']
142 ..text = 'Dominator Tree' 142 ..children = [
143 ..disabled = _analysis == _Analysis.dominatorTree 143 new ButtonElement()
144 ..onClick.listen((_) { 144 ..text = 'Allocations'
145 _analysis = _Analysis.dominatorTree; 145 ..disabled = _analysis == _Analysis.allocations
146 _r.dirty(); 146 ..onClick.listen((_) {
147 }), 147 _analysis = _Analysis.allocations;
148 new ButtonElement() 148 _r.dirty();
149 ..classes = ['tab_button'] 149 }),
150 ..text = 'Allocations' 150 new ButtonElement()
151 ..disabled = _analysis == _Analysis.allocations 151 ..text = 'Dominator Tree'
152 ..onClick.listen((_) { 152 ..disabled = _analysis == _Analysis.dominatorTree
153 _analysis = _Analysis.allocations; 153 ..onClick.listen((_) {
154 _r.dirty(); 154 _analysis = _Analysis.dominatorTree;
155 }), 155 _r.dirty();
156 }),
157 ]
156 ], 158 ],
157 ], 159 ],
158 current 160 current
159 ]; 161 ];
160 } 162 }
161 } 163 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/memory/allocations.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698