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

Side by Side Diff: runtime/bin/vmservice/observatory/lib/src/elements/object_common.dart

Issue 810623005: 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 object_common_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('object-common')
13 class ObjectCommonElement extends ObservatoryElement {
14 @published ServiceObject object;
15 @published ServiceMap path;
16 @published ServiceMap inboundReferences;
17 @observable int retainedBytes = null;
18
19 ObjectCommonElement.created() : super.created();
20
21 // TODO(koda): Add no-arg "calculate-link" instead of reusing "eval-link".
22 Future<ServiceObject> retainedSize(var dummy) {
23 return object.isolate.get(object.id + "/retained")
24 .then((Instance obj) {
25 retainedBytes = int.parse(obj.valueAsString);
26 });
27 }
28
29 Future<ServiceObject> retainingPath(var arg) {
30 return object.isolate.get(object.id + "/retaining_path?limit=$arg")
31 .then((ServiceObject obj) {
32 path = obj;
33 });
34 }
35
36 Future<ServiceObject> fetchInboundReferences(var arg) {
37 return object.isolate.get(object.id + "/inbound_references?limit=$arg")
38 .then((ServiceObject obj) {
39 inboundReferences = obj;
40 });
41 }
42
43 void refresh(Function onDone) {
44 object.reload().whenComplete(onDone);
45 }
46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698