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

Unified Diff: runtime/observatory/lib/src/app/page.dart

Issue 1013563002: CPU profile displayed in three tables with a tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/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);

Powered by Google App Engine
This is Rietveld 408576698