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

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

Issue 1269083006: Remember when a variable has been expanded/unexpanded in the debugger. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/curly_block.dart
diff --git a/runtime/observatory/lib/src/elements/curly_block.dart b/runtime/observatory/lib/src/elements/curly_block.dart
index df90830d447d1166d09a5b6a536bd61ab59d854d..004a02e36422e64341a952da5b85692070fd4f7b 100644
--- a/runtime/observatory/lib/src/elements/curly_block.dart
+++ b/runtime/observatory/lib/src/elements/curly_block.dart
@@ -5,22 +5,38 @@
library curly_block_element;
import 'package:polymer/polymer.dart';
+import 'observatory_element.dart';
@CustomTag('curly-block')
-class CurlyBlockElement extends PolymerElement {
+class CurlyBlockElement extends ObservatoryElement {
CurlyBlockElement.created() : super.created();
@observable bool expanded = false;
@observable bool busy = false;
@published var callback = null;
@published bool expand = false;
+ @published String expandKey;
void expandChanged(oldValue) {
expanded = expand;
}
+ void expandKeyChanged(oldValue) {
+ if (expandKey != null) {
+ var value = app.expansions[expandKey];
+ if (value != null) {
+ if (expanded != value) {
+ toggleExpand(null, null, null);
+ }
+ }
+ }
+ }
+
void doneCallback() {
expanded = !expanded;
+ if (expandKey != null) {
+ app.expansions[expandKey] = expanded;
+ }
busy = false;
}
@@ -29,11 +45,11 @@ class CurlyBlockElement extends PolymerElement {
if (busy) {
return;
}
+ busy = true;
if (callback != null) {
- busy = true;
callback(!expanded, doneCallback);
} else {
- expanded = !expanded;
+ doneCallback();
}
}
}
« no previous file with comments | « runtime/observatory/lib/src/app/application.dart ('k') | runtime/observatory/lib/src/elements/curly_block.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698