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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js

Issue 2553043003: [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: rebased Created 4 years 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
OLDNEW
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
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 * @return {boolean} 598 * @param {!Common.Event} event
599 */ 599 */
600 _longResume() { 600 _longResume(event) {
601 var debuggerModel = this._prepareToResume(); 601 var debuggerModel = this._prepareToResume();
602 if (!debuggerModel) 602 if (!debuggerModel)
603 return true; 603 return;
604 604
605 debuggerModel.skipAllPausesUntilReloadOrTimeout(500); 605 debuggerModel.skipAllPausesUntilReloadOrTimeout(500);
606 debuggerModel.resume(); 606 debuggerModel.resume();
607 return true;
608 } 607 }
609 608
610 /** 609 /**
611 * @return {boolean} 610 * @return {boolean}
612 */ 611 */
613 _stepOver() { 612 _stepOver() {
614 var debuggerModel = this._prepareToResume(); 613 var debuggerModel = this._prepareToResume();
615 if (!debuggerModel) 614 if (!debuggerModel)
616 return true; 615 return true;
617 616
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 } 673 }
675 674
676 /** 675 /**
677 * @return {!UI.Toolbar} 676 * @return {!UI.Toolbar}
678 */ 677 */
679 _createDebugToolbar() { 678 _createDebugToolbar() {
680 var debugToolbar = new UI.Toolbar('scripts-debug-toolbar'); 679 var debugToolbar = new UI.Toolbar('scripts-debug-toolbar');
681 680
682 var longResumeButton = 681 var longResumeButton =
683 new UI.ToolbarButton(Common.UIString('Resume with all pauses blocked for 500 ms'), 'largeicon-play'); 682 new UI.ToolbarButton(Common.UIString('Resume with all pauses blocked for 500 ms'), 'largeicon-play');
684 longResumeButton.addEventListener('click', this._longResume.bind(this), this ); 683 longResumeButton.addEventListener(UI.ToolbarButton.Events.Click, this._longR esume, this);
685 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._togglePau seAction, [longResumeButton], [])); 684 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._togglePau seAction, [longResumeButton], []));
686 685
687 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOverA ction)); 686 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOverA ction));
688 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepIntoA ction)); 687 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepIntoA ction));
689 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOutAc tion)); 688 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOutAc tion));
690 debugToolbar.appendSeparator(); 689 debugToolbar.appendSeparator();
691 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._toggleBre akpointsActiveAction)); 690 debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._toggleBre akpointsActiveAction));
692 691
693 this._pauseOnExceptionButton = new UI.ToolbarToggle('', 'largeicon-pause-on- exceptions'); 692 this._pauseOnExceptionButton = new UI.ToolbarToggle('', 'largeicon-pause-on- exceptions');
694 this._pauseOnExceptionButton.addEventListener('click', this._togglePauseOnEx ceptions, this); 693 this._pauseOnExceptionButton.addEventListener(UI.ToolbarButton.Events.Click, this._togglePauseOnExceptions, this);
695 debugToolbar.appendToolbarItem(this._pauseOnExceptionButton); 694 debugToolbar.appendToolbarItem(this._pauseOnExceptionButton);
696 695
697 debugToolbar.appendSeparator(); 696 debugToolbar.appendSeparator();
698 debugToolbar.appendToolbarItem(new UI.ToolbarCheckbox( 697 debugToolbar.appendToolbarItem(new UI.ToolbarCheckbox(
699 Common.UIString('Async'), Common.UIString('Capture async stack traces'), 698 Common.UIString('Async'), Common.UIString('Capture async stack traces'),
700 Common.moduleSetting('enableAsyncStackTraces'))); 699 Common.moduleSetting('enableAsyncStackTraces')));
701 700
702 return debugToolbar; 701 return debugToolbar;
703 } 702 }
704 703
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 */ 1314 */
1316 willHide() { 1315 willHide() {
1317 UI.inspectorView.setDrawerMinimized(false); 1316 UI.inspectorView.setDrawerMinimized(false);
1318 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc es.SourcesPanel.instance())); 1317 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc es.SourcesPanel.instance()));
1319 } 1318 }
1320 1319
1321 _showViewInWrapper() { 1320 _showViewInWrapper() {
1322 this._view.show(this.element); 1321 this._view.show(this.element);
1323 } 1322 }
1324 }; 1323 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698