| 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.View} | 7 * @extends {WebInspector.SimpleView} |
| 8 * @param {!WebInspector.BreakpointManager} breakpointManager | 8 * @param {!WebInspector.BreakpointManager} breakpointManager |
| 9 * @param {function(!WebInspector.UISourceCode, number=, number=, boolean=)} sho
wSourceLineDelegate | 9 * @param {function(!WebInspector.UISourceCode, number=, number=, boolean=)} sho
wSourceLineDelegate |
| 10 */ | 10 */ |
| 11 WebInspector.JavaScriptBreakpointsSidebarPane = function(breakpointManager, show
SourceLineDelegate) | 11 WebInspector.JavaScriptBreakpointsSidebarPane = function(breakpointManager, show
SourceLineDelegate) |
| 12 { | 12 { |
| 13 WebInspector.View.call(this, WebInspector.UIString("Breakpoints")); | 13 WebInspector.SimpleView.call(this, WebInspector.UIString("Breakpoints")); |
| 14 this.registerRequiredCSS("components/breakpointsList.css"); | 14 this.registerRequiredCSS("components/breakpointsList.css"); |
| 15 | 15 |
| 16 this._breakpointManager = breakpointManager; | 16 this._breakpointManager = breakpointManager; |
| 17 this._showSourceLineDelegate = showSourceLineDelegate; | 17 this._showSourceLineDelegate = showSourceLineDelegate; |
| 18 | 18 |
| 19 this.listElement = createElementWithClass("ol", "breakpoint-list"); | 19 this.listElement = createElementWithClass("ol", "breakpoint-list"); |
| 20 | 20 |
| 21 this.emptyElement = this.element.createChild("div", "gray-info-message"); | 21 this.emptyElement = this.element.createChild("div", "gray-info-message"); |
| 22 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints"); | 22 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints"); |
| 23 | 23 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 /** | 137 /** |
| 138 * @param {!WebInspector.BreakpointManager.Breakpoint} breakpoint | 138 * @param {!WebInspector.BreakpointManager.Breakpoint} breakpoint |
| 139 */ | 139 */ |
| 140 highlightBreakpoint: function(breakpoint) | 140 highlightBreakpoint: function(breakpoint) |
| 141 { | 141 { |
| 142 var breakpointItem = this._items.get(breakpoint); | 142 var breakpointItem = this._items.get(breakpoint); |
| 143 if (!breakpointItem) | 143 if (!breakpointItem) |
| 144 return; | 144 return; |
| 145 breakpointItem.element.classList.add("breakpoint-hit"); | 145 breakpointItem.element.classList.add("breakpoint-hit"); |
| 146 this._highlightedBreakpointItem = breakpointItem; | 146 this._highlightedBreakpointItem = breakpointItem; |
| 147 this.revealWidget(); | 147 this.revealView(); |
| 148 }, | 148 }, |
| 149 | 149 |
| 150 clearBreakpointHighlight: function() | 150 clearBreakpointHighlight: function() |
| 151 { | 151 { |
| 152 if (this._highlightedBreakpointItem) { | 152 if (this._highlightedBreakpointItem) { |
| 153 this._highlightedBreakpointItem.element.classList.remove("breakpoint
-hit"); | 153 this._highlightedBreakpointItem.element.classList.remove("breakpoint
-hit"); |
| 154 delete this._highlightedBreakpointItem; | 154 delete this._highlightedBreakpointItem; |
| 155 } | 155 } |
| 156 }, | 156 }, |
| 157 | 157 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 reset: function() | 248 reset: function() |
| 249 { | 249 { |
| 250 this.listElement.removeChildren(); | 250 this.listElement.removeChildren(); |
| 251 if (this.listElement.parentElement) { | 251 if (this.listElement.parentElement) { |
| 252 this.element.removeChild(this.listElement); | 252 this.element.removeChild(this.listElement); |
| 253 this.element.appendChild(this.emptyElement); | 253 this.element.appendChild(this.emptyElement); |
| 254 } | 254 } |
| 255 this._items.clear(); | 255 this._items.clear(); |
| 256 }, | 256 }, |
| 257 | 257 |
| 258 __proto__: WebInspector.View.prototype | 258 __proto__: WebInspector.SimpleView.prototype |
| 259 } | 259 } |
| OLD | NEW |