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

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

Issue 194623006: Improve the instance-view page in observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 instance_ref_element; 5 library instance_ref_element;
6 6
7 import 'package:polymer/polymer.dart'; 7 import 'package:polymer/polymer.dart';
8 import 'package:observatory/service.dart'; 8 import 'package:observatory/service.dart';
9 import 'service_ref.dart'; 9 import 'service_ref.dart';
10 10
(...skipping 20 matching lines...) Expand all
31 return super.hoverText; 31 return super.hoverText;
32 } 32 }
33 33
34 // TODO(turnidge): This is here to workaround vm/dart2js differences. 34 // TODO(turnidge): This is here to workaround vm/dart2js differences.
35 dynamic expander() { 35 dynamic expander() {
36 return expandEvent; 36 return expandEvent;
37 } 37 }
38 38
39 void expandEvent(bool expand, var done) { 39 void expandEvent(bool expand, var done) {
40 assert(ref is ServiceMap); 40 assert(ref is ServiceMap);
41 ServiceMap refMap = ref;
42 if (expand) { 41 if (expand) {
43 refMap.reload().then((_) { 42 ref.reload().then((result) {
44 if (refMap['preview'] != null) { 43 if (result['preview'] != null) {
45 refMap.name = refMap['preview']; 44 result.name = result['preview'];
46 refMap.vmName = refMap['preview']; 45 result.vmName = result['preview'];
47 } 46 }
47 ref = result;
48 notifyPropertyChange(#ref, 0, 1);
48 }).whenComplete(done); 49 }).whenComplete(done);
49 } else { 50 } else {
51 ServiceMap refMap = ref;
50 refMap['fields'] = null; 52 refMap['fields'] = null;
51 refMap['elements'] = null; 53 refMap['elements'] = null;
52 done(); 54 done();
53 } 55 }
54 } 56 }
55 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698