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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart

Issue 98253009: Refactor VM service IDs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 service_ref_element;
6
7 import 'package:polymer/polymer.dart';
8 import 'observatory_element.dart';
9
10 @CustomTag('service-ref')
11 class ServiceRefElement extends ObservatoryElement {
12 @published Map ref;
13 @published bool internal = false;
14 ServiceRefElement.created() : super.created();
15
16 void refChanged(oldValue) {
17 notifyPropertyChange(#url, "", url);
18 notifyPropertyChange(#name, [], name);
19 }
20
21 String get url {
22 if ((app != null) && (ref != null)) {
23 return app.locationManager.currentIsolateRelativeLink(ref['id']);
24 }
25 return '';
26 }
27
28 String get name {
29 if (ref == null) {
30 return '';
31 }
32 String name_key = internal ? 'name' : 'user_name';
33 if (ref[name_key] != null) {
34 return ref[name_key];
35 }
36 return '';
37 }
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698