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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptBreakpointsSidebarPane.js

Issue 2157713002: DevTools: introduce View: a named widget with the toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 5 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 unified diff | Download patch
OLDNEW
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.SidebarPane} 7 * @extends {WebInspector.View}
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.SidebarPane.call(this, WebInspector.UIString("Breakpoints")); 13 WebInspector.View.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", "info"); 21 this.emptyElement = this.element.createChild("div", "info");
22 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints"); 22 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints");
23 23
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 while (currentElement) { 106 while (currentElement) {
107 if (currentElement._data && this._compareBreakpoints(currentElement. _data, element._data) > 0) 107 if (currentElement._data && this._compareBreakpoints(currentElement. _data, element._data) > 0)
108 break; 108 break;
109 currentElement = currentElement.nextSibling; 109 currentElement = currentElement.nextSibling;
110 } 110 }
111 this._addListElement(element, currentElement); 111 this._addListElement(element, currentElement);
112 112
113 var breakpointItem = { element: element, checkbox: checkboxLabel.checkbo xElement }; 113 var breakpointItem = { element: element, checkbox: checkboxLabel.checkbo xElement };
114 this._items.set(breakpoint, breakpointItem); 114 this._items.set(breakpoint, breakpointItem);
115 115
116 this.expandPane(); 116 this.requestReveal();
117 }, 117 },
118 118
119 /** 119 /**
120 * @param {!WebInspector.UISourceCode} uiSourceCode 120 * @param {!WebInspector.UISourceCode} uiSourceCode
121 */ 121 */
122 didReceiveBreakpointLineForTest: function(uiSourceCode) 122 didReceiveBreakpointLineForTest: function(uiSourceCode)
123 { 123 {
124 }, 124 },
125 125
126 /** 126 /**
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 reset: function() 249 reset: function()
250 { 250 {
251 this.listElement.removeChildren(); 251 this.listElement.removeChildren();
252 if (this.listElement.parentElement) { 252 if (this.listElement.parentElement) {
253 this.element.removeChild(this.listElement); 253 this.element.removeChild(this.listElement);
254 this.element.appendChild(this.emptyElement); 254 this.element.appendChild(this.emptyElement);
255 } 255 }
256 this._items.clear(); 256 this._items.clear();
257 }, 257 },
258 258
259 __proto__: WebInspector.SidebarPane.prototype 259 __proto__: WebInspector.View.prototype
260 } 260 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698