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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/XHRBreakpointsSidebarPane.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/sources/XHRBreakpointsSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/XHRBreakpointsSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/XHRBreakpointsSidebarPane.js
index 0e228dd5add1220aadc4742bb6cec1c50fce8484..b9ae7c263894bea9669e3e47fd23ae68420046ee 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/XHRBreakpointsSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/XHRBreakpointsSidebarPane.js
@@ -5,6 +5,7 @@
/**
* @constructor
* @extends {WebInspector.BreakpointsSidebarPaneBase}
+ * @implements {WebInspector.ContextFlavorListener}
* @implements {WebInspector.TargetManager.Observer}
* @implements {WebInspector.ToolbarItem.ItemsProvider}
*/
@@ -20,8 +21,8 @@ WebInspector.XHRBreakpointsSidebarPane = function()
this._addButton.addEventListener("click", this._addButtonClicked.bind(this));
this.emptyElement.addEventListener("contextmenu", this._emptyElementContextMenu.bind(this), true);
-
WebInspector.targetManager.observeTargets(this, WebInspector.Target.Capability.Browser);
+ this._update();
}
WebInspector.XHRBreakpointsSidebarPane.prototype = {
@@ -221,12 +222,19 @@ WebInspector.XHRBreakpointsSidebarPane.prototype = {
WebInspector.InplaceEditor.startEditing(inputElement, new WebInspector.InplaceEditor.Config(finishEditing.bind(this, true), finishEditing.bind(this, false)));
},
+
dgozman 2016/08/15 21:31:03 style: extra blank line
/**
* @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.XHR) {
if (this._highlightedElement) {
this._highlightedElement.classList.remove("breakpoint-hit");

Powered by Google App Engine
This is Rietveld 408576698