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

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

Issue 184233007: Refactor Observatory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart
deleted file mode 100644
index 9b3feb2090c9436fb520ad51620992bb15633de0..0000000000000000000000000000000000000000
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library service_ref_element;
-
-import 'package:polymer/polymer.dart';
-import 'observatory_element.dart';
-
-@CustomTag('service-ref')
-class ServiceRefElement extends ObservatoryElement {
- @published Map ref;
- @published bool internal = false;
- @published Isolate isolate = null;
- ServiceRefElement.created() : super.created();
-
- void refChanged(oldValue) {
- notifyPropertyChange(#url, "", url);
- notifyPropertyChange(#name, [], name);
- notifyPropertyChange(#hoverText, "", hoverText);
- }
-
- String get url {
- if (ref != null) {
- return relativeLink(ref['id']);
- }
- return '';
- }
-
- String get hoverText {
- if (ref == null) {
- return '';
- }
- // Return the VM name by default.
- var name = ref['name'];
- return name != null ? name : '';
- }
-
- String get name {
- if (ref == null) {
- return 'NULL REF';
- }
- String name_key = internal ? 'name' : 'user_name';
- if (ref[name_key] != null) {
- return ref[name_key];
- } else if (ref['name'] != null) {
- return ref['name'];
- } else if (ref['user_name'] != null) {
- return ref['user_name'];
- }
- return '';
- }
-
- void isolateChanged(oldValue) {
- notifyPropertyChange(#relativeLink, 0, 1);
- }
-
- @observable
- String relativeLink(String link) {
- if (app == null) {
- return '';
- } else if (isolate == null) {
- return app.locationManager.currentIsolateRelativeLink(link);
- } else {
- return app.locationManager.relativeLink(isolate.id, link);
- }
- }
-}

Powered by Google App Engine
This is Rietveld 408576698