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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/BreakpointsSidebarPaneBase.js

Issue 2234193002: DevTools: migrate some of the sources panel sidebar panes to view management, allow view toolbars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: third_party/WebKit/Source/devtools/front_end/components/BreakpointsSidebarPaneBase.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/BreakpointsSidebarPaneBase.js b/third_party/WebKit/Source/devtools/front_end/components/BreakpointsSidebarPaneBase.js
index 251248e9252571bf83e7c0ecb98a8a3b1a70b520..80ad5bfa0b1bffd435426cb126198565ad2fa62a 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/BreakpointsSidebarPaneBase.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/BreakpointsSidebarPaneBase.js
@@ -30,12 +30,11 @@
/**
* @constructor
- * @extends {WebInspector.SimpleView}
- * @param {string} title
+ * @extends {WebInspector.VBox}
*/
-WebInspector.BreakpointsSidebarPaneBase = function(title)
+WebInspector.BreakpointsSidebarPaneBase = function()
{
- WebInspector.SimpleView.call(this, title);
+ WebInspector.VBox.call(this);
this.registerRequiredCSS("components/breakpointsList.css");
this.listElement = createElement("ol");
@@ -46,6 +45,9 @@ WebInspector.BreakpointsSidebarPaneBase = function(title)
this.emptyElement.textContent = WebInspector.UIString("No Breakpoints");
this.element.appendChild(this.emptyElement);
+ WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerPaused, this._debuggerPaused, this);
+ WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerResumed, this._debuggerResumed, this);
+ WebInspector.context.addFlavorChangeListener(WebInspector.Target, this.clearBreakpointHighlight, this);
dgozman 2016/08/11 01:42:16 Let's highlight here as well.
}
WebInspector.BreakpointsSidebarPaneBase.prototype = {
@@ -92,5 +94,33 @@ WebInspector.BreakpointsSidebarPaneBase.prototype = {
}
},
- __proto__: WebInspector.SimpleView.prototype
+ /**
+ * @param {!WebInspector.Event} event
+ */
+ _debuggerPaused: function(event)
+ {
+ var details = /** @type {!WebInspector.DebuggerPausedDetails} */ (event.data);
+ this.highlightDetails(details);
+ },
+
+ /**
+ * @param {!WebInspector.Event} event
+ */
+ _debuggerResumed: function(event)
+ {
+ this.clearBreakpointHighlight();
+ },
+
+ /**
+ * @param {!WebInspector.DebuggerPausedDetails} details
+ * @protected
+ */
+ highlightDetails: function(details) { },
+
+ /**
+ * @protected
+ */
+ clearBreakpointHighlight: function() { },
+
+ __proto__: WebInspector.VBox.prototype
}

Powered by Google App Engine
This is Rietveld 408576698