OLD | NEW |
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 Loading... |
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 = UI.createCheckboxLabel(''); | 69 var checkboxLabel = UI.CheckboxLabel.create(''); |
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 this.update(); | 219 this.update(); |
220 } | 220 } |
221 | 221 |
222 _didUpdateForTest() { | 222 _didUpdateForTest() { |
223 } | 223 } |
224 }; | 224 }; |
225 | 225 |
226 Sources.JavaScriptBreakpointsSidebarPane._locationSymbol = Symbol('location'); | 226 Sources.JavaScriptBreakpointsSidebarPane._locationSymbol = Symbol('location'); |
227 Sources.JavaScriptBreakpointsSidebarPane._checkboxLabelSymbol = Symbol('checkbox
-label'); | 227 Sources.JavaScriptBreakpointsSidebarPane._checkboxLabelSymbol = Symbol('checkbox
-label'); |
228 Sources.JavaScriptBreakpointsSidebarPane._snippetElementSymbol = Symbol('snippet
-element'); | 228 Sources.JavaScriptBreakpointsSidebarPane._snippetElementSymbol = Symbol('snippet
-element'); |
OLD | NEW |