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

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

Issue 2759533002: Remove legacy restart code (Closed)
Patch Set: asiva review Created 3 years, 9 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
« no previous file with comments | « runtime/lib/vmservice.cc ('k') | runtime/observatory/lib/src/service/object.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 debugger_page_element; 5 library debugger_page_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:svg'; 8 import 'dart:svg';
9 import 'dart:html'; 9 import 'dart:html';
10 import 'dart:math'; 10 import 'dart:math';
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 await debugger.vm.setName(args[0]); 1235 await debugger.vm.setName(args[0]);
1236 } 1236 }
1237 1237
1238 String helpShort = 'Rename the current Dart virtual machine'; 1238 String helpShort = 'Rename the current Dart virtual machine';
1239 1239
1240 String helpLong = 'Rename the current Dart virtual machine.\n' 1240 String helpLong = 'Rename the current Dart virtual machine.\n'
1241 '\n' 1241 '\n'
1242 'Syntax: vm name <name>\n'; 1242 'Syntax: vm name <name>\n';
1243 } 1243 }
1244 1244
1245 class VmRestartCommand extends DebuggerCommand {
1246 VmRestartCommand(Debugger debugger) : super(debugger, 'restart', []);
1247
1248 Future handleModalInput(String line) async {
1249 if (line == 'yes') {
1250 debugger.console.printRed('Restarting VM...');
1251 await debugger.vm.restart();
1252 debugger.input.exitMode();
1253 } else if (line == 'no') {
1254 debugger.console.printRed('VM restart canceled.');
1255 debugger.input.exitMode();
1256 } else {
1257 debugger.console.printRed("Please type 'yes' or 'no'");
1258 }
1259 }
1260
1261 Future run(List<String> args) async {
1262 debugger.input.enterMode('Restart vm? (yes/no)', handleModalInput);
1263 }
1264
1265 String helpShort = 'Restart a Dart virtual machine';
1266
1267 String helpLong = 'Restart a Dart virtual machine.\n'
1268 '\n'
1269 'Syntax: vm restart\n';
1270 }
1271 1245
1272 class VmCommand extends DebuggerCommand { 1246 class VmCommand extends DebuggerCommand {
1273 VmCommand(Debugger debugger) 1247 VmCommand(Debugger debugger)
1274 : super(debugger, 'vm', [ 1248 : super(debugger, 'vm', [
1275 new VmListCommand(debugger), 1249 new VmListCommand(debugger),
1276 new VmNameCommand(debugger), 1250 new VmNameCommand(debugger),
1277 new VmRestartCommand(debugger),
1278 ]); 1251 ]);
1279 1252
1280 Future run(List<String> args) async { 1253 Future run(List<String> args) async {
1281 debugger.console.print("'vm' expects a subcommand (see 'help vm')"); 1254 debugger.console.print("'vm' expects a subcommand (see 'help vm')");
1282 } 1255 }
1283 1256
1284 String helpShort = 'Manage a Dart virtual machine'; 1257 String helpShort = 'Manage a Dart virtual machine';
1285 1258
1286 String helpLong = 'Manage a Dart virtual machine.\n' 1259 String helpLong = 'Manage a Dart virtual machine.\n'
1287 '\n' 1260 '\n'
(...skipping 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after
3362 ..setAttribute('height', '24') 3335 ..setAttribute('height', '24')
3363 ..children = [ 3336 ..children = [
3364 new PathElement() 3337 new PathElement()
3365 ..setAttribute( 3338 ..setAttribute(
3366 'd', 3339 'd',
3367 'M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 ' 3340 'M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 '
3368 '10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 ' 3341 '10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 '
3369 '0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 ' 3342 '0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 '
3370 '9h2V7h-2v2z') 3343 '9h2V7h-2v2z')
3371 ]; 3344 ];
OLDNEW
« no previous file with comments | « runtime/lib/vmservice.cc ('k') | runtime/observatory/lib/src/service/object.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698