OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 return null; | 588 return null; |
589 | 589 |
590 this._paused = false; | 590 this._paused = false; |
591 | 591 |
592 this._clearInterface(); | 592 this._clearInterface(); |
593 var target = UI.context.flavor(SDK.Target); | 593 var target = UI.context.flavor(SDK.Target); |
594 return target ? SDK.DebuggerModel.fromTarget(target) : null; | 594 return target ? SDK.DebuggerModel.fromTarget(target) : null; |
595 } | 595 } |
596 | 596 |
597 /** | 597 /** |
598 * @param {!Common.Event} event | 598 * @return {boolean} |
599 */ | 599 */ |
600 _longResume(event) { | 600 _longResume() { |
601 var debuggerModel = this._prepareToResume(); | 601 var debuggerModel = this._prepareToResume(); |
602 if (!debuggerModel) | 602 if (!debuggerModel) |
603 return; | 603 return true; |
604 | 604 |
605 debuggerModel.skipAllPausesUntilReloadOrTimeout(500); | 605 debuggerModel.skipAllPausesUntilReloadOrTimeout(500); |
606 debuggerModel.resume(); | 606 debuggerModel.resume(); |
| 607 return true; |
607 } | 608 } |
608 | 609 |
609 /** | 610 /** |
610 * @return {boolean} | 611 * @return {boolean} |
611 */ | 612 */ |
612 _stepOver() { | 613 _stepOver() { |
613 var debuggerModel = this._prepareToResume(); | 614 var debuggerModel = this._prepareToResume(); |
614 if (!debuggerModel) | 615 if (!debuggerModel) |
615 return true; | 616 return true; |
616 | 617 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 } | 674 } |
674 | 675 |
675 /** | 676 /** |
676 * @return {!UI.Toolbar} | 677 * @return {!UI.Toolbar} |
677 */ | 678 */ |
678 _createDebugToolbar() { | 679 _createDebugToolbar() { |
679 var debugToolbar = new UI.Toolbar('scripts-debug-toolbar'); | 680 var debugToolbar = new UI.Toolbar('scripts-debug-toolbar'); |
680 | 681 |
681 var longResumeButton = | 682 var longResumeButton = |
682 new UI.ToolbarButton(Common.UIString('Resume with all pauses blocked for
500 ms'), 'largeicon-play'); | 683 new UI.ToolbarButton(Common.UIString('Resume with all pauses blocked for
500 ms'), 'largeicon-play'); |
683 longResumeButton.addEventListener(UI.ToolbarButton.Events.Click, this._longR
esume, this); | 684 longResumeButton.addEventListener('click', this._longResume.bind(this), this
); |
684 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._togglePau
seAction, [longResumeButton], [])); | 685 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._togglePau
seAction, [longResumeButton], [])); |
685 | 686 |
686 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOverA
ction)); | 687 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOverA
ction)); |
687 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepIntoA
ction)); | 688 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepIntoA
ction)); |
688 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOutAc
tion)); | 689 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOutAc
tion)); |
689 debugToolbar.appendSeparator(); | 690 debugToolbar.appendSeparator(); |
690 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._toggleBre
akpointsActiveAction)); | 691 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._toggleBre
akpointsActiveAction)); |
691 | 692 |
692 this._pauseOnExceptionButton = new UI.ToolbarToggle('', 'largeicon-pause-on-
exceptions'); | 693 this._pauseOnExceptionButton = new UI.ToolbarToggle('', 'largeicon-pause-on-
exceptions'); |
693 this._pauseOnExceptionButton.addEventListener(UI.ToolbarButton.Events.Click,
this._togglePauseOnExceptions, this); | 694 this._pauseOnExceptionButton.addEventListener('click', this._togglePauseOnEx
ceptions, this); |
694 debugToolbar.appendToolbarItem(this._pauseOnExceptionButton); | 695 debugToolbar.appendToolbarItem(this._pauseOnExceptionButton); |
695 | 696 |
696 debugToolbar.appendSeparator(); | 697 debugToolbar.appendSeparator(); |
697 debugToolbar.appendToolbarItem(new UI.ToolbarCheckbox( | 698 debugToolbar.appendToolbarItem(new UI.ToolbarCheckbox( |
698 Common.UIString('Async'), Common.UIString('Capture async stack traces'), | 699 Common.UIString('Async'), Common.UIString('Capture async stack traces'), |
699 Common.moduleSetting('enableAsyncStackTraces'))); | 700 Common.moduleSetting('enableAsyncStackTraces'))); |
700 | 701 |
701 return debugToolbar; | 702 return debugToolbar; |
702 } | 703 } |
703 | 704 |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 */ | 1315 */ |
1315 willHide() { | 1316 willHide() { |
1316 UI.inspectorView.setDrawerMinimized(false); | 1317 UI.inspectorView.setDrawerMinimized(false); |
1317 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc
es.SourcesPanel.instance())); | 1318 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc
es.SourcesPanel.instance())); |
1318 } | 1319 } |
1319 | 1320 |
1320 _showViewInWrapper() { | 1321 _showViewInWrapper() { |
1321 this._view.show(this.element); | 1322 this._view.show(this.element); |
1322 } | 1323 } |
1323 }; | 1324 }; |
OLD | NEW |