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

Unified Diff: runtime/observatory/lib/src/elements/code_ref.dart

Issue 928833003: Add Function based profile tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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/observatory/lib/src/elements/code_ref.dart
diff --git a/runtime/observatory/lib/src/elements/code_ref.dart b/runtime/observatory/lib/src/elements/code_ref.dart
index 488bebcc126b549753a49b9d91784e4c2a4a8239..88464de426d04d525db999f020ed31e18ff6873d 100644
--- a/runtime/observatory/lib/src/elements/code_ref.dart
+++ b/runtime/observatory/lib/src/elements/code_ref.dart
@@ -10,12 +10,25 @@ import 'package:observatory/service.dart';
@CustomTag('code-ref')
class CodeRefElement extends ServiceRefElement {
- @observable Code get code => ref;
+ CodeRefElement.created() : super.created();
+
+ Code get code => ref;
refChanged(oldValue) {
super.refChanged(oldValue);
- notifyPropertyChange(#code, 0, 1);
+ _updateShadowDom();
}
- CodeRefElement.created() : super.created();
+ void _updateShadowDom() {
+ clearShadowRoot();
+ if (code == null) {
+ return;
+ }
+ var name = (code.isOptimized ? '*' : '') + code.name;
+ if (code.isDartCode) {
+ insertLinkIntoShadowRoot(name, url, hoverText);
+ } else {
+ insertTextSpanIntoShadowRoot(name);
+ }
+ }
}
« no previous file with comments | « runtime/observatory/lib/src/elements/class_ref.html ('k') | runtime/observatory/lib/src/elements/code_ref.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698