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

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

Issue 2604883002: DevTools: namespace globals (Closed)
Patch Set: address CL feedback Created 3 years, 11 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 * @implements {UI.ContextFlavorListener} 5 * @implements {UI.ContextFlavorListener}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Sources.JavaScriptBreakpointsSidebarPane = class extends UI.ThrottledWidget { 8 Sources.JavaScriptBreakpointsSidebarPane = class extends UI.ThrottledWidget {
9 constructor() { 9 constructor() {
10 super(true); 10 super(true);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 null; 59 null;
60 60
61 var shouldShowView = false; 61 var shouldShowView = false;
62 var entry = this._listElement.firstChild; 62 var entry = this._listElement.firstChild;
63 var promises = []; 63 var promises = [];
64 for (var descriptor of locationForEntry.keysArray()) { 64 for (var descriptor of locationForEntry.keysArray()) {
65 if (!entry) { 65 if (!entry) {
66 entry = this._listElement.createChild('div', 'breakpoint-entry'); 66 entry = this._listElement.createChild('div', 'breakpoint-entry');
67 entry.addEventListener('contextmenu', this._breakpointContextMenu.bind(t his), true); 67 entry.addEventListener('contextmenu', this._breakpointContextMenu.bind(t his), true);
68 entry.addEventListener('click', this._revealLocation.bind(this), false); 68 entry.addEventListener('click', this._revealLocation.bind(this), false);
69 var checkboxLabel = createCheckboxLabel(''); 69 var checkboxLabel = UI.createCheckboxLabel('');
70 checkboxLabel.addEventListener('click', this._breakpointCheckboxClicked. bind(this), false); 70 checkboxLabel.addEventListener('click', this._breakpointCheckboxClicked. bind(this), false);
71 entry.appendChild(checkboxLabel); 71 entry.appendChild(checkboxLabel);
72 entry[Sources.JavaScriptBreakpointsSidebarPane._checkboxLabelSymbol] = c heckboxLabel; 72 entry[Sources.JavaScriptBreakpointsSidebarPane._checkboxLabelSymbol] = c heckboxLabel;
73 var snippetElement = entry.createChild('div', 'source-text monospace'); 73 var snippetElement = entry.createChild('div', 'source-text monospace');
74 entry[Sources.JavaScriptBreakpointsSidebarPane._snippetElementSymbol] = snippetElement; 74 entry[Sources.JavaScriptBreakpointsSidebarPane._snippetElementSymbol] = snippetElement;
75 } 75 }
76 76
77 var locations = Array.from(locationForEntry.get(descriptor)); 77 var locations = Array.from(locationForEntry.get(descriptor));
78 var uiLocation = locations[0].uiLocation; 78 var uiLocation = locations[0].uiLocation;
79 var isSelected = 79 var isSelected =
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 this.update(); 215 this.update();
216 } 216 }
217 217
218 _didUpdateForTest() { 218 _didUpdateForTest() {
219 } 219 }
220 }; 220 };
221 221
222 Sources.JavaScriptBreakpointsSidebarPane._locationSymbol = Symbol('location'); 222 Sources.JavaScriptBreakpointsSidebarPane._locationSymbol = Symbol('location');
223 Sources.JavaScriptBreakpointsSidebarPane._checkboxLabelSymbol = Symbol('checkbox -label'); 223 Sources.JavaScriptBreakpointsSidebarPane._checkboxLabelSymbol = Symbol('checkbox -label');
224 Sources.JavaScriptBreakpointsSidebarPane._snippetElementSymbol = Symbol('snippet -element'); 224 Sources.JavaScriptBreakpointsSidebarPane._snippetElementSymbol = Symbol('snippet -element');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698