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

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

Issue 2238003002: DevTools: migrate sources panel sidebar to views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: followed up on the watch test. 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/DOMBreakpointsSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/DOMBreakpointsSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/components/DOMBreakpointsSidebarPane.js
index 6c38cbe871bede19d7d427d9a5af397d77184b25..33712285bdb7e777b79f314554b1bf22a93d035c 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/DOMBreakpointsSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/DOMBreakpointsSidebarPane.js
@@ -31,6 +31,7 @@
/**
* @constructor
* @extends {WebInspector.BreakpointsSidebarPaneBase}
+ * @implements {WebInspector.ContextFlavorListener}
*/
WebInspector.DOMBreakpointsSidebarPane = function()
{
@@ -55,21 +56,20 @@ WebInspector.DOMBreakpointsSidebarPane = function()
this._contextMenuLabels[this._breakpointTypes.AttributeModified] = WebInspector.UIString.capitalize("Attributes ^modifications");
this._contextMenuLabels[this._breakpointTypes.NodeRemoved] = WebInspector.UIString.capitalize("Node ^removal");
- WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.InspectedURLChanged, this._inspectedURLChanged, this);
WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspector.DOMModel.Events.NodeRemoved, this._nodeRemoved, this);
+ WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.InspectedURLChanged, this._inspectedURLChanged, this);
+ this._inspectedURL = WebInspector.targetManager.inspectedURL();
+ this._update();
}
WebInspector.DOMBreakpointsSidebarPane.Marker = "breakpoint-marker";
WebInspector.DOMBreakpointsSidebarPane.prototype = {
- _inspectedURLChanged: function(event)
+ _inspectedURLChanged: function()
{
- var target = /** @type {!WebInspector.Target} */ (event.data);
- if (target !== WebInspector.targetManager.mainTarget())
- return;
this._breakpointElements = {};
this.reset();
- this._inspectedURL = target.inspectedURL().removeURLFragment();
+ this._inspectedURL = WebInspector.targetManager.inspectedURL();
},
/**
@@ -322,10 +322,16 @@ WebInspector.DOMBreakpointsSidebarPane.prototype = {
/**
* @override
- * @param {?WebInspector.DebuggerPausedDetails} details
+ * @param {?Object} object
*/
- highlightDetails: function(details)
+ flavorChanged: function(object)
+ {
+ this._update();
+ },
+
+ _update: function()
{
+ var details = WebInspector.context.flavor(WebInspector.DebuggerPausedDetails);
if (!details || details.reason !== WebInspector.DebuggerModel.BreakReason.DOM) {
if (this._highlightedElement) {
this._highlightedElement.classList.remove("breakpoint-hit");

Powered by Google App Engine
This is Rietveld 408576698