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

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

Issue 839543002: Revert "Build Observatory with runtime" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library class_view_element;
6
7 import 'dart:async';
8 import 'observatory_element.dart';
9 import 'package:observatory/service.dart';
10 import 'package:polymer/polymer.dart';
11
12 @CustomTag('class-view')
13 class ClassViewElement extends ObservatoryElement {
14 @published Class cls;
15 @observable ServiceMap instances;
16 @observable int retainedBytes;
17 ClassViewElement.created() : super.created();
18
19 Future<ServiceObject> eval(String text) {
20 return cls.get("eval?expr=${Uri.encodeComponent(text)}");
21 }
22
23 Future<ServiceObject> reachable(var limit) {
24 return cls.get("instances?limit=$limit")
25 .then((ServiceMap obj) {
26 instances = obj;
27 });
28 }
29
30 // TODO(koda): Add no-arg "calculate-link" instead of reusing "eval-link".
31 Future<ServiceObject> retainedSize(var dummy) {
32 return cls.get("retained").then((Instance obj) {
33 retainedBytes = int.parse(obj.valueAsString);
34 });
35 }
36
37 void refresh(var done) {
38 instances = null;
39 retainedBytes = null;
40 cls.reload().whenComplete(done);
41 }
42
43 void refreshCoverage(var done) {
44 cls.refreshCoverage().whenComplete(done);
45 }
46 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/class_tree.html ('k') | runtime/observatory/lib/src/elements/class_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698