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

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

Issue 2289953003: Converted Observatory library-view element (Closed)
Patch Set: Fixed inspect page pattern matching Created 4 years, 3 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 field_view_element; 5 library field_view_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:observatory/models.dart' as M; 9 import 'package:observatory/models.dart' as M;
10 import 'package:observatory/src/elements/class_ref.dart'; 10 import 'package:observatory/src/elements/class_ref.dart';
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 final menu = [ 184 final menu = [
185 new NavTopMenuElement(queue: _r.queue), 185 new NavTopMenuElement(queue: _r.queue),
186 new NavVMMenuElement(_vm, _events, queue: _r.queue), 186 new NavVMMenuElement(_vm, _events, queue: _r.queue),
187 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue) 187 new NavIsolateMenuElement(_isolate, _events, queue: _r.queue)
188 ]; 188 ];
189 if (_library != null) { 189 if (_library != null) {
190 menu.add(new NavLibraryMenuElement(_isolate, _field.dartOwner, 190 menu.add(new NavLibraryMenuElement(_isolate, _field.dartOwner,
191 queue: _r.queue)); 191 queue: _r.queue));
192 } else if (_field.dartOwner is M.ClassRef) { 192 } else if (_field.dartOwner is M.ClassRef) {
193 menu.add( 193 menu.add(
194 new NavClassMenuElement(_isolate, _field.dartOwner, queue: _r.queue), 194 new NavClassMenuElement(_isolate, _field.dartOwner, queue: _r.queue)
195 ); 195 );
196 } 196 }
197 menu.addAll([ 197 menu.addAll([
198 new NavMenuElement(_field.name, last: true, queue: _r.queue), 198 new NavMenuElement(_field.name, last: true, queue: _r.queue),
199 new NavRefreshElement(queue: _r.queue) 199 new NavRefreshElement(queue: _r.queue)
200 ..onRefresh.listen((e) { 200 ..onRefresh.listen((e) {
201 e.element.disabled = true; 201 e.element.disabled = true;
202 _refresh(); 202 _refresh();
203 }), 203 }),
204 new NavNotifyElement(_notifications, queue: _r.queue) 204 new NavNotifyElement(_notifications, queue: _r.queue)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 Future _refresh() async { 285 Future _refresh() async {
286 _field = await _fields.get(_isolate, _field.id); 286 _field = await _fields.get(_isolate, _field.id);
287 if (_field.dartOwner is M.LibraryRef) { 287 if (_field.dartOwner is M.LibraryRef) {
288 _library = _field.dartOwner; 288 _library = _field.dartOwner;
289 } else if (_field.dartOwner is M.ClassRef) { 289 } else if (_field.dartOwner is M.ClassRef) {
290 _library = (await _classes.get(_isolate, _field.dartOwner.id)).library; 290 _library = (await _classes.get(_isolate, _field.dartOwner.id)).library;
291 } 291 }
292 _r.dirty(); 292 _r.dirty();
293 } 293 }
294 } 294 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/css/shared.css ('k') | runtime/observatory/lib/src/elements/library_view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698