| 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.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
| 9 */ | 9 */ |
| 10 WebInspector.XHRBreakpointsSidebarPane = function() | 10 WebInspector.XHRBreakpointsSidebarPane = function() |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 var contextMenu = new WebInspector.ContextMenu(event); | 45 var contextMenu = new WebInspector.ContextMenu(event); |
| 46 contextMenu.appendItem(WebInspector.UIString.capitalize("Add ^breakpoint
"), this._addButtonClicked.bind(this)); | 46 contextMenu.appendItem(WebInspector.UIString.capitalize("Add ^breakpoint
"), this._addButtonClicked.bind(this)); |
| 47 contextMenu.show(); | 47 contextMenu.show(); |
| 48 }, | 48 }, |
| 49 | 49 |
| 50 _addButtonClicked: function(event) | 50 _addButtonClicked: function(event) |
| 51 { | 51 { |
| 52 if (event) | 52 if (event) |
| 53 event.consume(); | 53 event.consume(); |
| 54 | 54 |
| 55 this.requestReveal(); | 55 this.revealWidget(); |
| 56 | 56 |
| 57 var inputElementContainer = createElementWithClass("p", "breakpoint-cond
ition"); | 57 var inputElementContainer = createElementWithClass("p", "breakpoint-cond
ition"); |
| 58 inputElementContainer.textContent = WebInspector.UIString("Break when UR
L contains:"); | 58 inputElementContainer.textContent = WebInspector.UIString("Break when UR
L contains:"); |
| 59 | 59 |
| 60 var inputElement = inputElementContainer.createChild("span", "editing"); | 60 var inputElement = inputElementContainer.createChild("span", "editing"); |
| 61 inputElement.id = "breakpoint-condition-input"; | 61 inputElement.id = "breakpoint-condition-input"; |
| 62 this.addListElement(inputElementContainer, /** @type {?Element} */ (this
.listElement.firstChild)); | 62 this.addListElement(inputElementContainer, /** @type {?Element} */ (this
.listElement.firstChild)); |
| 63 | 63 |
| 64 /** | 64 /** |
| 65 * @param {boolean} accept | 65 * @param {boolean} accept |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 } | 210 } |
| 211 | 211 |
| 212 WebInspector.InplaceEditor.startEditing(inputElement, new WebInspector.I
nplaceEditor.Config(finishEditing.bind(this, true), finishEditing.bind(this, fal
se))); | 212 WebInspector.InplaceEditor.startEditing(inputElement, new WebInspector.I
nplaceEditor.Config(finishEditing.bind(this, true), finishEditing.bind(this, fal
se))); |
| 213 }, | 213 }, |
| 214 | 214 |
| 215 highlightBreakpoint: function(url) | 215 highlightBreakpoint: function(url) |
| 216 { | 216 { |
| 217 var element = this._breakpointElements.get(url); | 217 var element = this._breakpointElements.get(url); |
| 218 if (!element) | 218 if (!element) |
| 219 return; | 219 return; |
| 220 this.requestReveal(); | 220 this.revealWidget(); |
| 221 element.classList.add("breakpoint-hit"); | 221 element.classList.add("breakpoint-hit"); |
| 222 this._highlightedElement = element; | 222 this._highlightedElement = element; |
| 223 }, | 223 }, |
| 224 | 224 |
| 225 clearBreakpointHighlight: function() | 225 clearBreakpointHighlight: function() |
| 226 { | 226 { |
| 227 if (this._highlightedElement) { | 227 if (this._highlightedElement) { |
| 228 this._highlightedElement.classList.remove("breakpoint-hit"); | 228 this._highlightedElement.classList.remove("breakpoint-hit"); |
| 229 delete this._highlightedElement; | 229 delete this._highlightedElement; |
| 230 } | 230 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 246 var breakpoints = this._xhrBreakpointsSetting.get(); | 246 var breakpoints = this._xhrBreakpointsSetting.get(); |
| 247 for (var i = 0; i < breakpoints.length; ++i) { | 247 for (var i = 0; i < breakpoints.length; ++i) { |
| 248 var breakpoint = breakpoints[i]; | 248 var breakpoint = breakpoints[i]; |
| 249 if (breakpoint && typeof breakpoint.url === "string") | 249 if (breakpoint && typeof breakpoint.url === "string") |
| 250 this._setBreakpoint(breakpoint.url, breakpoint.enabled, target); | 250 this._setBreakpoint(breakpoint.url, breakpoint.enabled, target); |
| 251 } | 251 } |
| 252 }, | 252 }, |
| 253 | 253 |
| 254 __proto__: WebInspector.BreakpointsSidebarPaneBase.prototype | 254 __proto__: WebInspector.BreakpointsSidebarPaneBase.prototype |
| 255 } | 255 } |
| OLD | NEW |