| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.BreakpointsSidebarPaneBase} | 7 * @extends {WebInspector.BreakpointsSidebarPaneBase} |
| 8 * @implements {WebInspector.ContextFlavorListener} | 8 * @implements {WebInspector.ContextFlavorListener} |
| 9 * @implements {WebInspector.TargetManager.Observer} | 9 * @implements {WebInspector.TargetManager.Observer} |
| 10 * @implements {WebInspector.ToolbarItem.ItemsProvider} | 10 * @implements {WebInspector.ToolbarItem.ItemsProvider} |
| 11 */ | 11 */ |
| 12 WebInspector.XHRBreakpointsSidebarPane = function() | 12 WebInspector.XHRBreakpointsSidebarPane = function() |
| 13 { | 13 { |
| 14 WebInspector.BreakpointsSidebarPaneBase.call(this); | 14 WebInspector.BreakpointsSidebarPaneBase.call(this); |
| 15 this._xhrBreakpointsSetting = WebInspector.settings.createLocalSetting("xhrB
reakpoints", []); | 15 this._xhrBreakpointsSetting = WebInspector.settings.createLocalSetting("xhrB
reakpoints", []); |
| 16 | 16 |
| 17 /** @type {!Map.<string, !Element>} */ | 17 /** @type {!Map.<string, !Element>} */ |
| 18 this._breakpointElements = new Map(); | 18 this._breakpointElements = new Map(); |
| 19 | 19 |
| 20 this._addButton = new WebInspector.ToolbarButton(WebInspector.UIString("Add
breakpoint"), "add-toolbar-item"); | 20 this._addButton = new WebInspector.ToolbarButton(WebInspector.UIString("Add
breakpoint"), "add-toolbar-item"); |
| 21 this._addButton.addEventListener("click", this._addButtonClicked.bind(this))
; | 21 this._addButton.addEventListener("click", this._addButtonClicked.bind(this))
; |
| 22 | 22 |
| 23 this.emptyElement.addEventListener("contextmenu", this._emptyElementContextM
enu.bind(this), true); | 23 this.emptyElement.addEventListener("contextmenu", this._emptyElementContextM
enu.bind(this), true); |
| 24 WebInspector.targetManager.observeTargets(this, WebInspector.Target.Capabili
ty.Browser); | 24 WebInspector.targetManager.observeTargets(this, WebInspector.Target.Capabili
ty.Browser); |
| 25 this._update(); | 25 this._update(); |
| 26 } | 26 }; |
| 27 | 27 |
| 28 WebInspector.XHRBreakpointsSidebarPane.prototype = { | 28 WebInspector.XHRBreakpointsSidebarPane.prototype = { |
| 29 /** | 29 /** |
| 30 * @override | 30 * @override |
| 31 * @param {!WebInspector.Target} target | 31 * @param {!WebInspector.Target} target |
| 32 */ | 32 */ |
| 33 targetAdded: function(target) | 33 targetAdded: function(target) |
| 34 { | 34 { |
| 35 this._restoreBreakpoints(target); | 35 this._restoreBreakpoints(target); |
| 36 }, | 36 }, |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 { | 267 { |
| 268 var breakpoints = this._xhrBreakpointsSetting.get(); | 268 var breakpoints = this._xhrBreakpointsSetting.get(); |
| 269 for (var i = 0; i < breakpoints.length; ++i) { | 269 for (var i = 0; i < breakpoints.length; ++i) { |
| 270 var breakpoint = breakpoints[i]; | 270 var breakpoint = breakpoints[i]; |
| 271 if (breakpoint && typeof breakpoint.url === "string") | 271 if (breakpoint && typeof breakpoint.url === "string") |
| 272 this._setBreakpoint(breakpoint.url, breakpoint.enabled, target); | 272 this._setBreakpoint(breakpoint.url, breakpoint.enabled, target); |
| 273 } | 273 } |
| 274 }, | 274 }, |
| 275 | 275 |
| 276 __proto__: WebInspector.BreakpointsSidebarPaneBase.prototype | 276 __proto__: WebInspector.BreakpointsSidebarPaneBase.prototype |
| 277 } | 277 }; |
| OLD | NEW |