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

Unified Diff: Source/devtools/front_end/sources/SourcesPanel.js

Issue 1302323005: Devtools UI: Add shortcut for activating/deactivating breakpoints (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/sources/SourcesPanel.js
diff --git a/Source/devtools/front_end/sources/SourcesPanel.js b/Source/devtools/front_end/sources/SourcesPanel.js
index 278fa22bd15a20786384a10bd1cc2a25aecaeaf2..380b268dce587311ab8275671ba59d8aee46765e 100644
--- a/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/Source/devtools/front_end/sources/SourcesPanel.js
@@ -692,7 +692,7 @@ WebInspector.SourcesPanel.prototype = {
rawLocation.continueToLocation();
},
- _toggleBreakpointsClicked: function(event)
+ _toggleBreakpointsActive: function()
{
WebInspector.breakpointManager.setBreakpointsActive(!WebInspector.breakpointManager.breakpointsActive());
},
@@ -753,9 +753,8 @@ WebInspector.SourcesPanel.prototype = {
debugToolbar.appendSeparator();
// Toggle Breakpoints
- this._toggleBreakpointsButton = new WebInspector.ToolbarButton(WebInspector.UIString("Deactivate breakpoints"), "breakpoint-toolbar-item");
+ this._toggleBreakpointsButton = WebInspector.ToolbarButton.createActionButton("debugger.toggle-breakpoints-active");
this._toggleBreakpointsButton.setToggled(false);
- this._toggleBreakpointsButton.addEventListener("click", this._toggleBreakpointsClicked, this);
debugToolbar.appendToolbarItem(this._toggleBreakpointsButton);
// Pause on Exception
@@ -1417,7 +1416,9 @@ WebInspector.SourcesPanel.DebuggingActionDelegate.prototype = {
case "debugger.run-snippet":
panel._runSnippet();
break;
-
+ case "debugger.toggle-breakpoints-active":
+ panel._toggleBreakpointsActive();
+ break;
}
}
}
« no previous file with comments | « no previous file | Source/devtools/front_end/sources/module.json » ('j') | Source/devtools/front_end/sources/module.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698