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

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

Issue 2752403002: [DevTools] Migrate usages of Target to RuntimeModel where makes sense (Closed)
Patch Set: review comments addressed Created 3 years, 9 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 {SDK.TargetManager.Observer} 5 * @implements {SDK.TargetManager.Observer}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Sources.EventListenerBreakpointsSidebarPane = class extends UI.VBox { 8 Sources.EventListenerBreakpointsSidebarPane = class extends UI.VBox {
9 constructor() { 9 constructor() {
10 super(); 10 super();
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 'click', this._breakpointCheckboxClicked.bind(this, eventName, categor yItem.targetNames), true); 178 'click', this._breakpointCheckboxClicked.bind(this, eventName, categor yItem.targetNames), true);
179 breakpointItem.parent = categoryItem; 179 breakpointItem.parent = categoryItem;
180 180
181 categoryItem.children[eventName] = breakpointItem; 181 categoryItem.children[eventName] = breakpointItem;
182 } 182 }
183 this._categoryItems.push(categoryItem); 183 this._categoryItems.push(categoryItem);
184 } 184 }
185 185
186 _update() { 186 _update() {
187 var target = UI.context.flavor(SDK.Target); 187 var target = UI.context.flavor(SDK.Target);
188 var debuggerModel = SDK.DebuggerModel.fromTarget(target); 188 var debuggerModel = target ? target.model(SDK.DebuggerModel) : null;
189 var details = debuggerModel ? debuggerModel.debuggerPausedDetails() : null; 189 var details = debuggerModel ? debuggerModel.debuggerPausedDetails() : null;
190 190
191 if (!details || details.reason !== SDK.DebuggerModel.BreakReason.EventListen er) { 191 if (!details || details.reason !== SDK.DebuggerModel.BreakReason.EventListen er) {
192 if (this._highlightedElement) { 192 if (this._highlightedElement) {
193 this._highlightedElement.classList.remove('breakpoint-hit'); 193 this._highlightedElement.classList.remove('breakpoint-hit');
194 delete this._highlightedElement; 194 delete this._highlightedElement;
195 } 195 }
196 return; 196 return;
197 } 197 }
198 var eventName = details.auxData['eventName']; 198 var eventName = details.auxData['eventName'];
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 var breakpoint = breakpoints[i]; 370 var breakpoint = breakpoints[i];
371 if (breakpoint && typeof breakpoint.eventName === 'string') 371 if (breakpoint && typeof breakpoint.eventName === 'string')
372 this._setBreakpoint(breakpoint.eventName, breakpoint.targetNames, target ); 372 this._setBreakpoint(breakpoint.eventName, breakpoint.targetNames, target );
373 } 373 }
374 } 374 }
375 }; 375 };
376 376
377 Sources.EventListenerBreakpointsSidebarPane.categoryListener = 'listener:'; 377 Sources.EventListenerBreakpointsSidebarPane.categoryListener = 'listener:';
378 Sources.EventListenerBreakpointsSidebarPane.categoryInstrumentation = 'instrumen tation:'; 378 Sources.EventListenerBreakpointsSidebarPane.categoryInstrumentation = 'instrumen tation:';
379 Sources.EventListenerBreakpointsSidebarPane.eventTargetAny = '*'; 379 Sources.EventListenerBreakpointsSidebarPane.eventTargetAny = '*';
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698