Chromium Code Reviews| 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"); |