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

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 858e75f275880901a945463b20c4fc787cafbc51..7457b1d3828278ed168587fedbb028e3bea9cc55 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,8 +27,9 @@ abstract class Page extends Observable {
}
/// Called when the page should update its state based on [uri].
- void visit(Uri uri, Map argsMap) {
- args = toObservable(argsMap);
+ void visit(Uri uri, Map internalArguments) {
+ this.internalArguments.clear();
+ this.internalArguments.addAll(internalArguments);
Analytics.reportPageView(uri);
_visit(uri);
}
@@ -204,6 +205,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);
« no previous file with comments | « runtime/observatory/lib/src/app/location_manager.dart ('k') | runtime/observatory/lib/src/cpu_profile/cpu_profile.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698