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

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

Issue 2267863002: Converted Observatory ports-page element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixed indentation Created 4 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
« no previous file with comments | « runtime/observatory/lib/repositories.dart ('k') | runtime/observatory/lib/src/elements/css/shared.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bd2fe175166a11b9eff4de17193a4d630b31d5b9..dca602e1205917e90a2337b659ead13291ea75b3 100644
--- a/runtime/observatory/lib/src/app/page.dart
+++ b/runtime/observatory/lib/src/app/page.dart
@@ -6,8 +6,10 @@ part of app;
AllocationProfileRepository _allocationProfileRepository
= new AllocationProfileRepository();
+InstanceRepository _instanceRepository = new InstanceRepository();
IsolateSampleProfileRepository _isolateSampleProfileRepository
= new IsolateSampleProfileRepository();
+PortsRepository _portsRepository = new PortsRepository();
class IsolateNotFound implements Exception {
String isolateId;
@@ -301,19 +303,27 @@ class AllocationProfilerPage extends MatchingPage {
}
}
-class PortsPage extends SimplePage {
- PortsPage(app)
- : super('ports', 'ports-page', app);
+class PortsPage extends MatchingPage {
+ PortsPage(app) : super('ports', app);
+
+ DivElement container = new DivElement();
void _visit(Uri uri) {
super._visit(uri);
getIsolate(uri).then((isolate) {
- if (element != null) {
- PortsPageElement page = element;
- page.isolate = isolate;
- }
+ container.children = [
+ new PortsElement(isolate.vm, isolate, app.events, app.notifications,
+ _portsRepository, _instanceRepository,
+ queue: app.queue)
+ ];
});
}
+
+ void onInstall() {
+ if (element == null) {
+ element = container;
+ }
+ }
}
class PersistentHandlesPage extends SimplePage {
« no previous file with comments | « runtime/observatory/lib/repositories.dart ('k') | runtime/observatory/lib/src/elements/css/shared.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698