Index: runtime/observatory/lib/src/app/page.dart |
diff --git a/runtime/observatory/lib/src/app/page.dart b/runtime/observatory/lib/src/app/page.dart |
index e79f3dc40ac6dd97c3b4d34dbc60446f5aa105e7..c384d8c2eb308c6208ecde3e8d8f9616b2fe3a5c 100644 |
--- a/runtime/observatory/lib/src/app/page.dart |
+++ b/runtime/observatory/lib/src/app/page.dart |
@@ -10,9 +10,9 @@ part of app; |
/// can handle the current location, the first page to say yes, wins. |
abstract class Page extends Observable { |
final ObservatoryApplication app; |
- |
+ final ObservableMap<String, String> internalArguments = |
+ new ObservableMap<String, String>(); |
@observable ObservatoryElement element; |
- @observable ObservableMap args; |
Page(this.app); |
@@ -27,9 +27,9 @@ abstract class Page extends Observable { |
} |
/// Called when the page should update its state based on [uri]. |
- /// NOTE: Only called when the page is installed. |
- void visit(Uri uri, Map argsMap) { |
- args = toObservable(argsMap); |
+ void visit(Uri uri, Map internalArguments) { |
+ this.internalArguments.clear(); |
+ this.internalArguments.addAll(internalArguments); |
_visit(uri); |
} |
@@ -204,6 +204,27 @@ class CpuProfilerPage extends SimplePage { |
} |
} |
+class TableCpuProfilerPage extends SimplePage { |
+ TableCpuProfilerPage(app) |
+ : super('profiler-table', 'cpu-profile-table', app); |
+ |
+ void _visit(Uri uri) { |
+ super._visit(uri); |
+ getIsolate(uri).then((isolate) { |
+ if (element != null) { |
+ /// Update the page. |
+ CpuProfileTableElement page = element; |
+ page.isolate = isolate; |
+ // TODO(johnmccutchan): Provide a more general mechanism to notify |
+ // elements of URI parameter changes. Possibly via a stream off of |
+ // LocationManager. With a stream individual elements (not just pages) |
+ // could be notified. |
+ page.checkParameters(); |
+ } |
+ }); |
+ } |
+} |
+ |
class AllocationProfilerPage extends SimplePage { |
AllocationProfilerPage(app) |
: super('allocation-profiler', 'heap-profile', app); |