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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/BreakpointsSidebarPaneBase.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: review comments addressed 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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.SimpleView} 33 * @extends {WebInspector.VBox}
34 * @param {string} title
35 */ 34 */
36 WebInspector.BreakpointsSidebarPaneBase = function(title) 35 WebInspector.BreakpointsSidebarPaneBase = function()
37 { 36 {
38 WebInspector.SimpleView.call(this, title); 37 WebInspector.VBox.call(this);
39 this.registerRequiredCSS("components/breakpointsList.css"); 38 this.registerRequiredCSS("components/breakpointsList.css");
40 39
41 this.listElement = createElement("ol"); 40 this.listElement = createElement("ol");
42 this.listElement.className = "breakpoint-list"; 41 this.listElement.className = "breakpoint-list";
43 42
44 this.emptyElement = createElement("div"); 43 this.emptyElement = createElement("div");
45 this.emptyElement.className = "gray-info-message"; 44 this.emptyElement.className = "gray-info-message";
46 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints"); 45 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints");
47 46
48 this.element.appendChild(this.emptyElement); 47 this.element.appendChild(this.emptyElement);
48 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI nspector.DebuggerModel.Events.DebuggerPaused, this._update, this);
49 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI nspector.DebuggerModel.Events.DebuggerResumed, this._update, this);
50 WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._upda te, this);
49 } 51 }
50 52
51 WebInspector.BreakpointsSidebarPaneBase.prototype = { 53 WebInspector.BreakpointsSidebarPaneBase.prototype = {
52 /** 54 /**
53 * @param {!Element} element 55 * @param {!Element} element
54 * @param {?Node=} beforeNode 56 * @param {?Node=} beforeNode
55 * @protected 57 * @protected
56 */ 58 */
57 addListElement: function(element, beforeNode) 59 addListElement: function(element, beforeNode)
58 { 60 {
(...skipping 26 matching lines...) Expand all
85 */ 87 */
86 reset: function() 88 reset: function()
87 { 89 {
88 this.listElement.removeChildren(); 90 this.listElement.removeChildren();
89 if (this.listElement.parentElement) { 91 if (this.listElement.parentElement) {
90 this.element.removeChild(this.listElement); 92 this.element.removeChild(this.listElement);
91 this.element.appendChild(this.emptyElement); 93 this.element.appendChild(this.emptyElement);
92 } 94 }
93 }, 95 },
94 96
95 __proto__: WebInspector.SimpleView.prototype 97 _update: function()
98 {
99 var target = WebInspector.context.flavor(WebInspector.Target);
100 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target);
101 var details = debuggerModel ? debuggerModel.debuggerPausedDetails() : nu ll;
102 this.highlightDetails(details);
103 },
104
105 /**
106 * @param {?WebInspector.DebuggerPausedDetails} details
107 * @protected
108 */
109 highlightDetails: function(details) { },
110
111 __proto__: WebInspector.VBox.prototype
96 } 112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698