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

Side by Side Diff: runtime/observatory/lib/src/elements/ports.dart

Issue 1189543003: Ports page for isolates (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library ports;
6
7 import 'dart:async';
8 import 'dart:html';
9 import 'observatory_element.dart';
10 import 'package:observatory/app.dart';
11 import 'package:observatory/service.dart';
12 import 'package:polymer/polymer.dart';
13
14 @CustomTag('ports-page')
15 class PortsPageElement extends ObservatoryElement {
16 PortsPageElement.created() : super.created();
17
18 @observable Isolate isolate;
19 @observable ServiceObject ports;
20
21 void isolateChanged(oldValue) {
22 if (isolate != null) {
23 isolate.getPorts().then(_refreshView);
24 }
25 }
26
27 Future refresh() {
28 return isolate.getPorts().then(_refreshView);
29 }
30
31 _refreshView(ServiceObject object) {
32 ports = object['ports'];
33 }
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698