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

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

Powered by Google App Engine
This is Rietveld 408576698