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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/elements/isolate_summary.dart

Issue 381383010: Add breakpoints and single-stepping to Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix bugs, gen js Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library isolate_summary_element; 5 library isolate_summary_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'observatory_element.dart'; 8 import 'observatory_element.dart';
9 import 'package:observatory/app.dart'; 9 import 'package:observatory/app.dart';
10 import 'package:observatory/service.dart'; 10 import 'package:observatory/service.dart';
11 import 'package:polymer/polymer.dart'; 11 import 'package:polymer/polymer.dart';
12 12
13 @CustomTag('isolate-summary') 13 @CustomTag('isolate-summary')
14 class IsolateSummaryElement extends ObservatoryElement { 14 class IsolateSummaryElement extends ObservatoryElement {
15 IsolateSummaryElement.created() : super.created(); 15 IsolateSummaryElement.created() : super.created();
16 16
17 @published Isolate isolate; 17 @published Isolate isolate;
18 } 18 }
19 19
20 @CustomTag('isolate-run-state') 20 @CustomTag('isolate-run-state')
21 class IsolateRunStateElement extends ObservatoryElement { 21 class IsolateRunStateElement extends ObservatoryElement {
22 IsolateRunStateElement.created() : super.created(); 22 IsolateRunStateElement.created() : super.created();
23 23
24 @published Isolate isolate; 24 @published Isolate isolate;
25 25
26 Future pause(_) { 26 Future pause(_) {
27 return isolate.get("debug/pause").then((result) { 27 return isolate.pause();
28 // TODO(turnidge): Instead of asserting here, handle errors
29 // properly.
30 assert(result.serviceType == 'Success');
31 return isolate.reload();
32 });
33 } 28 }
34
35 Future resume(_) { 29 Future resume(_) {
36 return isolate.get("debug/resume").then((result) { 30 app.removePauseEvents(isolate);
37 // TODO(turnidge): Instead of asserting here, handle errors 31 return isolate.resume();
38 // properly. 32 }
39 assert(result.serviceType == 'Success'); 33 Future stepInto(_) {
40 app.removePauseEvents(isolate); 34 app.removePauseEvents(isolate);
41 return isolate.reload(); 35 return isolate.stepInto();
42 }); 36 }
37 Future stepOver(_) {
38 app.removePauseEvents(isolate);
39 return isolate.stepOver();
40 }
41 Future stepOut(_) {
42 app.removePauseEvents(isolate);
43 return isolate.stepOut();
43 } 44 }
44 } 45 }
45 46
46 @CustomTag('isolate-location') 47 @CustomTag('isolate-location')
47 class IsolateLocationElement extends ObservatoryElement { 48 class IsolateLocationElement extends ObservatoryElement {
48 IsolateLocationElement.created() : super.created(); 49 IsolateLocationElement.created() : super.created();
49 50
50 @published Isolate isolate; 51 @published Isolate isolate;
51 } 52 }
52 53
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 chart.update(counters); 105 chart.update(counters);
105 var element = shadowRoot.querySelector('#counterPieChart'); 106 var element = shadowRoot.querySelector('#counterPieChart');
106 if (element != null) { 107 if (element != null) {
107 chart.draw(element); 108 chart.draw(element);
108 } 109 }
109 } 110 }
110 } 111 }
111 112
112 113
113 114
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698