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

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

Issue 2238003002: DevTools: migrate sources panel sidebar to views. (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 27 matching lines...) Expand all
38 this.registerRequiredCSS("components/breakpointsList.css"); 38 this.registerRequiredCSS("components/breakpointsList.css");
39 39
40 this.listElement = createElement("ol"); 40 this.listElement = createElement("ol");
41 this.listElement.className = "breakpoint-list"; 41 this.listElement.className = "breakpoint-list";
42 42
43 this.emptyElement = createElement("div"); 43 this.emptyElement = createElement("div");
44 this.emptyElement.className = "gray-info-message"; 44 this.emptyElement.className = "gray-info-message";
45 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints"); 45 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints");
46 46
47 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);
51 } 48 }
52 49
53 WebInspector.BreakpointsSidebarPaneBase.prototype = { 50 WebInspector.BreakpointsSidebarPaneBase.prototype = {
54 /** 51 /**
55 * @param {!Element} element 52 * @param {!Element} element
56 * @param {?Node=} beforeNode 53 * @param {?Node=} beforeNode
57 * @protected 54 * @protected
58 */ 55 */
59 addListElement: function(element, beforeNode) 56 addListElement: function(element, beforeNode)
60 { 57 {
(...skipping 26 matching lines...) Expand all
87 */ 84 */
88 reset: function() 85 reset: function()
89 { 86 {
90 this.listElement.removeChildren(); 87 this.listElement.removeChildren();
91 if (this.listElement.parentElement) { 88 if (this.listElement.parentElement) {
92 this.element.removeChild(this.listElement); 89 this.element.removeChild(this.listElement);
93 this.element.appendChild(this.emptyElement); 90 this.element.appendChild(this.emptyElement);
94 } 91 }
95 }, 92 },
96 93
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 94 __proto__: WebInspector.VBox.prototype
112 } 95 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698