| OLD | NEW |
| 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:html'; | 8 import 'dart:html'; |
| 9 import 'observatory_element.dart'; | 9 import 'observatory_element.dart'; |
| 10 import 'package:observatory/app.dart'; | 10 import 'package:observatory/app.dart'; |
| (...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1699 debugger.input = $['commandline']; | 1699 debugger.input = $['commandline']; |
| 1700 debugger.input.debugger = debugger; | 1700 debugger.input.debugger = debugger; |
| 1701 debugger.init(); | 1701 debugger.init(); |
| 1702 | 1702 |
| 1703 _isolateSubscriptionFuture = | 1703 _isolateSubscriptionFuture = |
| 1704 app.vm.listenEventStream(VM.kIsolateStream, debugger.onEvent); | 1704 app.vm.listenEventStream(VM.kIsolateStream, debugger.onEvent); |
| 1705 _debugSubscriptionFuture = | 1705 _debugSubscriptionFuture = |
| 1706 app.vm.listenEventStream(VM.kDebugStream, debugger.onEvent); | 1706 app.vm.listenEventStream(VM.kDebugStream, debugger.onEvent); |
| 1707 _stdoutSubscriptionFuture = | 1707 _stdoutSubscriptionFuture = |
| 1708 app.vm.listenEventStream(VM.kStdoutStream, debugger.onStdout); | 1708 app.vm.listenEventStream(VM.kStdoutStream, debugger.onStdout); |
| 1709 if (_stdoutSubscriptionFuture != null) { |
| 1710 // TODO(turnidge): How do we want to handle this in general? |
| 1711 _stdoutSubscriptionFuture.catchError((e, st) { |
| 1712 Logger.root.info('Failed to subscribe to stdout: $e\n$st\n'); |
| 1713 }); |
| 1714 } |
| 1709 _stderrSubscriptionFuture = | 1715 _stderrSubscriptionFuture = |
| 1710 app.vm.listenEventStream(VM.kStderrStream, debugger.onStderr); | 1716 app.vm.listenEventStream(VM.kStderrStream, debugger.onStderr); |
| 1717 if (_stderrSubscriptionFuture != null) { |
| 1718 // TODO(turnidge): How do we want to handle this in general? |
| 1719 _stderrSubscriptionFuture.catchError((e, st) { |
| 1720 Logger.root.info('Failed to subscribe to stderr: $e\n$st\n'); |
| 1721 }); |
| 1722 } |
| 1711 _logSubscriptionFuture = | 1723 _logSubscriptionFuture = |
| 1712 app.vm.listenEventStream(Isolate.kLoggingStream, debugger.onEvent); | 1724 app.vm.listenEventStream(Isolate.kLoggingStream, debugger.onEvent); |
| 1713 // Turn on the periodic poll timer for this page. | 1725 // Turn on the periodic poll timer for this page. |
| 1714 pollPeriod = const Duration(milliseconds:100); | 1726 pollPeriod = const Duration(milliseconds:100); |
| 1715 | 1727 |
| 1716 onClick.listen((event) { | 1728 onClick.listen((event) { |
| 1717 // Random clicks should focus on the text box. If the user selects | 1729 // Random clicks should focus on the text box. If the user selects |
| 1718 // a range, don't interfere. | 1730 // a range, don't interfere. |
| 1719 var selection = window.getSelection(); | 1731 var selection = window.getSelection(); |
| 1720 if (selection == null || | 1732 if (selection == null || |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2305 } | 2317 } |
| 2306 }); | 2318 }); |
| 2307 } | 2319 } |
| 2308 | 2320 |
| 2309 void focus() { | 2321 void focus() { |
| 2310 $['textBox'].focus(); | 2322 $['textBox'].focus(); |
| 2311 } | 2323 } |
| 2312 | 2324 |
| 2313 DebuggerInputElement.created() : super.created(); | 2325 DebuggerInputElement.created() : super.created(); |
| 2314 } | 2326 } |
| OLD | NEW |