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

Side by Side Diff: Source/devtools/front_end/SourcesPanel.js

Issue 225873004: DevTools: Handle the F8 shortcut forwarded from the inspected page (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months 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 | Annotate | Revision Log
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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 */ 480 */
481 _editorChanged: function(uiSourceCode) 481 _editorChanged: function(uiSourceCode)
482 { 482 {
483 var isSnippet = uiSourceCode && uiSourceCode.project().type() === WebIns pector.projectTypes.Snippets; 483 var isSnippet = uiSourceCode && uiSourceCode.project().type() === WebIns pector.projectTypes.Snippets;
484 this._runSnippetButton.element.classList.toggle("hidden", !isSnippet); 484 this._runSnippetButton.element.classList.toggle("hidden", !isSnippet);
485 }, 485 },
486 486
487 /** 487 /**
488 * @return {boolean} 488 * @return {boolean}
489 */ 489 */
490 _togglePause: function() 490 togglePause: function()
491 { 491 {
492 if (this._paused) { 492 if (this._paused) {
493 delete this._skipExecutionLineRevealing; 493 delete this._skipExecutionLineRevealing;
494 this._paused = false; 494 this._paused = false;
495 this._waitingToPause = false; 495 this._waitingToPause = false;
496 WebInspector.debuggerModel.resume(); 496 WebInspector.debuggerModel.resume();
497 } else { 497 } else {
498 this._waitingToPause = true; 498 this._waitingToPause = true;
499 // Make sure pauses didn't stick skipped. 499 // Make sure pauses didn't stick skipped.
500 WebInspector.debuggerModel.skipAllPauses(false); 500 WebInspector.debuggerModel.skipAllPauses(false);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 var platformSpecificModifier = WebInspector.KeyboardShortcut.Modifiers.C trlOrMeta; 628 var platformSpecificModifier = WebInspector.KeyboardShortcut.Modifiers.C trlOrMeta;
629 629
630 // Run snippet. 630 // Run snippet.
631 title = WebInspector.UIString("Run snippet (%s)."); 631 title = WebInspector.UIString("Run snippet (%s).");
632 handler = this._runSnippet.bind(this); 632 handler = this._runSnippet.bind(this);
633 this._runSnippetButton = this._createButtonAndRegisterShortcuts("scripts -run-snippet", title, handler, WebInspector.ShortcutsScreen.SourcesPanelShortcut s.RunSnippet); 633 this._runSnippetButton = this._createButtonAndRegisterShortcuts("scripts -run-snippet", title, handler, WebInspector.ShortcutsScreen.SourcesPanelShortcut s.RunSnippet);
634 debugToolbar.appendChild(this._runSnippetButton.element); 634 debugToolbar.appendChild(this._runSnippetButton.element);
635 this._runSnippetButton.element.classList.add("hidden"); 635 this._runSnippetButton.element.classList.add("hidden");
636 636
637 // Continue. 637 // Continue.
638 handler = this._togglePause.bind(this); 638 handler = this.togglePause.bind(this);
639 this._pauseButton = this._createButtonAndRegisterShortcuts("scripts-paus e", "", handler, WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PauseContinu e); 639 this._pauseButton = this._createButtonAndRegisterShortcuts("scripts-paus e", "", handler, WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PauseContinu e);
640 debugToolbar.appendChild(this._pauseButton.element); 640 debugToolbar.appendChild(this._pauseButton.element);
641 641
642 // Long resume. 642 // Long resume.
643 title = WebInspector.UIString("Resume with all pauses blocked for 500 ms "); 643 title = WebInspector.UIString("Resume with all pauses blocked for 500 ms ");
644 this._longResumeButton = new WebInspector.StatusBarButton(title, "script s-long-resume"); 644 this._longResumeButton = new WebInspector.StatusBarButton(title, "script s-long-resume");
645 this._longResumeButton.addEventListener("click", this._longResume.bind(t his), this); 645 this._longResumeButton.addEventListener("click", this._longResume.bind(t his), this);
646 646
647 // Step over. 647 // Step over.
648 title = WebInspector.UIString("Step over next function call (%s)."); 648 title = WebInspector.UIString("Step over next function call (%s).");
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 var disabled = forbidden || (status === "disabled"); 1324 var disabled = forbidden || (status === "disabled");
1325 1325
1326 this._disableJSInfo.classList.toggle("hidden", !forbidden); 1326 this._disableJSInfo.classList.toggle("hidden", !forbidden);
1327 this._disableJSCheckbox.checked = disabled; 1327 this._disableJSCheckbox.checked = disabled;
1328 this._disableJSCheckbox.disabled = forbidden; 1328 this._disableJSCheckbox.disabled = forbidden;
1329 } 1329 }
1330 }, 1330 },
1331 1331
1332 __proto__: WebInspector.UISettingDelegate.prototype 1332 __proto__: WebInspector.UISettingDelegate.prototype
1333 } 1333 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698