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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 return null; | 592 return null; |
593 | 593 |
594 this._paused = false; | 594 this._paused = false; |
595 | 595 |
596 this._clearInterface(); | 596 this._clearInterface(); |
597 var target = UI.context.flavor(SDK.Target); | 597 var target = UI.context.flavor(SDK.Target); |
598 return target ? SDK.DebuggerModel.fromTarget(target) : null; | 598 return target ? SDK.DebuggerModel.fromTarget(target) : null; |
599 } | 599 } |
600 | 600 |
601 /** | 601 /** |
602 * @param {!Common.Event} event | 602 * @return {boolean} |
603 */ | 603 */ |
604 _longResume(event) { | 604 _longResume() { |
605 var debuggerModel = this._prepareToResume(); | 605 var debuggerModel = this._prepareToResume(); |
606 if (!debuggerModel) | 606 if (!debuggerModel) |
607 return; | 607 return true; |
608 | 608 |
609 debuggerModel.skipAllPausesUntilReloadOrTimeout(500); | 609 debuggerModel.skipAllPausesUntilReloadOrTimeout(500); |
610 debuggerModel.resume(); | 610 debuggerModel.resume(); |
| 611 return true; |
611 } | 612 } |
612 | 613 |
613 /** | 614 /** |
614 * @return {boolean} | 615 * @return {boolean} |
615 */ | 616 */ |
616 _stepOver() { | 617 _stepOver() { |
617 var debuggerModel = this._prepareToResume(); | 618 var debuggerModel = this._prepareToResume(); |
618 if (!debuggerModel) | 619 if (!debuggerModel) |
619 return true; | 620 return true; |
620 | 621 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 } | 678 } |
678 | 679 |
679 /** | 680 /** |
680 * @return {!UI.Toolbar} | 681 * @return {!UI.Toolbar} |
681 */ | 682 */ |
682 _createDebugToolbar() { | 683 _createDebugToolbar() { |
683 var debugToolbar = new UI.Toolbar('scripts-debug-toolbar'); | 684 var debugToolbar = new UI.Toolbar('scripts-debug-toolbar'); |
684 | 685 |
685 var longResumeButton = | 686 var longResumeButton = |
686 new UI.ToolbarButton(Common.UIString('Resume with all pauses blocked for
500 ms'), 'largeicon-play'); | 687 new UI.ToolbarButton(Common.UIString('Resume with all pauses blocked for
500 ms'), 'largeicon-play'); |
687 longResumeButton.addEventListener(UI.ToolbarButton.Events.Click, this._longR
esume, this); | 688 longResumeButton.addEventListener('click', this._longResume.bind(this), this
); |
688 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._togglePau
seAction, [longResumeButton], [])); | 689 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._togglePau
seAction, [longResumeButton], [])); |
689 | 690 |
690 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOverA
ction)); | 691 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOverA
ction)); |
691 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepIntoA
ction)); | 692 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepIntoA
ction)); |
692 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOutAc
tion)); | 693 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOutAc
tion)); |
693 debugToolbar.appendSeparator(); | 694 debugToolbar.appendSeparator(); |
694 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._toggleBre
akpointsActiveAction)); | 695 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._toggleBre
akpointsActiveAction)); |
695 | 696 |
696 this._pauseOnExceptionButton = new UI.ToolbarToggle('', 'largeicon-pause-on-
exceptions'); | 697 this._pauseOnExceptionButton = new UI.ToolbarToggle('', 'largeicon-pause-on-
exceptions'); |
697 this._pauseOnExceptionButton.addEventListener('click', this._togglePauseOnEx
ceptions, this); | 698 this._pauseOnExceptionButton.addEventListener('click', this._togglePauseOnEx
ceptions, this); |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 */ | 1319 */ |
1319 willHide() { | 1320 willHide() { |
1320 UI.inspectorView.setDrawerMinimized(false); | 1321 UI.inspectorView.setDrawerMinimized(false); |
1321 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc
es.SourcesPanel.instance())); | 1322 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc
es.SourcesPanel.instance())); |
1322 } | 1323 } |
1323 | 1324 |
1324 _showViewInWrapper() { | 1325 _showViewInWrapper() { |
1325 this._view.show(this.element); | 1326 this._view.show(this.element); |
1326 } | 1327 } |
1327 }; | 1328 }; |
OLD | NEW |