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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/DOMBreakpointsSidebarPane.js

Issue 2234193002: DevTools: migrate some of the sources panel sidebar panes to view management, allow view toolbars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @extends {WebInspector.BreakpointsSidebarPaneBase} 33 * @extends {WebInspector.BreakpointsSidebarPaneBase}
34 */ 34 */
35 WebInspector.DOMBreakpointsSidebarPane = function() 35 WebInspector.DOMBreakpointsSidebarPane = function()
36 { 36 {
37 WebInspector.BreakpointsSidebarPaneBase.call(this, WebInspector.UIString("DO M Breakpoints")); 37 WebInspector.BreakpointsSidebarPaneBase.call(this);
38 this._domBreakpointsSetting = WebInspector.settings.createLocalSetting("domB reakpoints", []); 38 this._domBreakpointsSetting = WebInspector.settings.createLocalSetting("domB reakpoints", []);
39 this.listElement.classList.add("dom-breakpoints-list"); 39 this.listElement.classList.add("dom-breakpoints-list");
40 40
41 this._breakpointElements = {}; 41 this._breakpointElements = {};
42 42
43 this._breakpointTypes = { 43 this._breakpointTypes = {
44 SubtreeModified: "subtree-modified", 44 SubtreeModified: "subtree-modified",
45 AttributeModified: "attribute-modified", 45 AttributeModified: "attribute-modified",
46 NodeRemoved: "node-removed" 46 NodeRemoved: "node-removed"
47 }; 47 };
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 */ 313 */
314 _checkboxClicked: function(node, type, event) 314 _checkboxClicked: function(node, type, event)
315 { 315 {
316 if (event.target.checked) 316 if (event.target.checked)
317 node.target().domdebuggerAgent().setDOMBreakpoint(node.id, type); 317 node.target().domdebuggerAgent().setDOMBreakpoint(node.id, type);
318 else 318 else
319 node.target().domdebuggerAgent().removeDOMBreakpoint(node.id, type); 319 node.target().domdebuggerAgent().removeDOMBreakpoint(node.id, type);
320 this._saveBreakpoints(); 320 this._saveBreakpoints();
321 }, 321 },
322 322
323 highlightBreakpoint: function(auxData) 323 /**
324 * @override
325 * @param {!WebInspector.DebuggerPausedDetails} details
326 */
327 highlightDetails: function(details)
324 { 328 {
329 if (details.reason !== WebInspector.DebuggerModel.BreakReason.DOM)
330 return;
331 WebInspector.viewManager.revealViewWithWidget(this);
dgozman 2016/08/11 01:42:16 Remove.
332 var auxData = details.auxData;
325 var breakpointId = this._createBreakpointId(auxData.nodeId, auxData.type ); 333 var breakpointId = this._createBreakpointId(auxData.nodeId, auxData.type );
326 var element = this._breakpointElements[breakpointId]; 334 var element = this._breakpointElements[breakpointId];
327 if (!element) 335 if (!element)
328 return; 336 return;
329 this.revealView(); 337 WebInspector.viewManager.revealViewWithWidget(this);
330 element.classList.add("breakpoint-hit"); 338 element.classList.add("breakpoint-hit");
331 this._highlightedElement = element; 339 this._highlightedElement = element;
332 }, 340 },
333 341
342 /**
343 * @override
344 */
334 clearBreakpointHighlight: function() 345 clearBreakpointHighlight: function()
335 { 346 {
336 if (this._highlightedElement) { 347 if (this._highlightedElement) {
337 this._highlightedElement.classList.remove("breakpoint-hit"); 348 this._highlightedElement.classList.remove("breakpoint-hit");
338 delete this._highlightedElement; 349 delete this._highlightedElement;
339 } 350 }
340 }, 351 },
341 352
342 /** 353 /**
343 * @param {number} nodeId 354 * @param {number} nodeId
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 pane.show(this.element); 434 pane.show(this.element);
424 }, 435 },
425 436
426 __proto__: WebInspector.VBox.prototype 437 __proto__: WebInspector.VBox.prototype
427 } 438 }
428 439
429 /** 440 /**
430 * @type {!WebInspector.DOMBreakpointsSidebarPane} 441 * @type {!WebInspector.DOMBreakpointsSidebarPane}
431 */ 442 */
432 WebInspector.domBreakpointsSidebarPane; 443 WebInspector.domBreakpointsSidebarPane;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698