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

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

Issue 350153004: DevTools: Activate breakpoints in breakpointManager (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/BreakpointsSidebarPane.js
diff --git a/Source/devtools/front_end/sources/BreakpointsSidebarPane.js b/Source/devtools/front_end/sources/BreakpointsSidebarPane.js
index ab6b8b18a74fb5998907077a0f77dd8379a198e4..390211412b70c0708b04409cc4ec00e250344e59 100644
--- a/Source/devtools/front_end/sources/BreakpointsSidebarPane.js
+++ b/Source/devtools/front_end/sources/BreakpointsSidebarPane.js
@@ -26,14 +26,12 @@
/**
* @constructor
* @extends {WebInspector.SidebarPane}
- * @param {!WebInspector.DebuggerModel} debuggerModel
* @param {!WebInspector.BreakpointManager} breakpointManager
* @param {function(!WebInspector.UISourceCode, number=, number=, boolean=)} showSourceLineDelegate
*/
-WebInspector.JavaScriptBreakpointsSidebarPane = function(debuggerModel, breakpointManager, showSourceLineDelegate)
+WebInspector.JavaScriptBreakpointsSidebarPane = function(breakpointManager, showSourceLineDelegate)
{
WebInspector.SidebarPane.call(this, WebInspector.UIString("Breakpoints"));
- this._debuggerModel = debuggerModel;
this.registerRequiredCSS("breakpointsList.css");
this._breakpointManager = breakpointManager;
@@ -64,12 +62,20 @@ WebInspector.JavaScriptBreakpointsSidebarPane.prototype = {
_emptyElementContextMenu: function(event)
{
var contextMenu = new WebInspector.ContextMenu(event);
- var breakpointActive = this._debuggerModel.breakpointsActive();
+ this._appendBreakpointActiveItem(contextMenu);
+ contextMenu.show();
+ },
+
+ /**
+ * @param {!WebInspector.ContextMenu} contextMenu
+ */
+ _appendBreakpointActiveItem: function(contextMenu)
+ {
+ var breakpointActive = this._breakpointManager.breakpointsActive();
var breakpointActiveTitle = breakpointActive ?
WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Deactivate breakpoints" : "Deactivate Breakpoints") :
WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Activate breakpoints" : "Activate Breakpoints");
- contextMenu.appendItem(breakpointActiveTitle, this._debuggerModel.setBreakpointsActive.bind(this._debuggerModel, !breakpointActive));
- contextMenu.show();
+ contextMenu.appendItem(breakpointActiveTitle, this._breakpointManager.setBreakpointsActive.bind(this._breakpointManager, !breakpointActive));
},
/**
@@ -208,11 +214,7 @@ WebInspector.JavaScriptBreakpointsSidebarPane.prototype = {
}
contextMenu.appendSeparator();
- var breakpointActive = this._debuggerModel.breakpointsActive();
- var breakpointActiveTitle = breakpointActive ?
- WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Deactivate breakpoints" : "Deactivate Breakpoints") :
- WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Activate breakpoints" : "Activate Breakpoints");
- contextMenu.appendItem(breakpointActiveTitle, this._debuggerModel.setBreakpointsActive.bind(this._debuggerModel, !breakpointActive));
+ this._appendBreakpointActiveItem(contextMenu);
function enabledBreakpointCount(breakpoints)
{

Powered by Google App Engine
This is Rietveld 408576698