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

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

Issue 2153153003: DevTools: remove dead code, disambiguate expand for sections. (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.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
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.expand(); 55 this.expandPane();
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
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.expand(); 220 this.expandPane();
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698