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

Side by Side Diff: Source/devtools/front_end/components/NativeBreakpointsSidebarPane.js

Issue 351903003: DevTools: Avoid private member access in non-profiler code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 30 matching lines...) Expand all
41 this.listElement.className = "breakpoint-list"; 41 this.listElement.className = "breakpoint-list";
42 42
43 this.emptyElement = document.createElement("div"); 43 this.emptyElement = document.createElement("div");
44 this.emptyElement.className = "info"; 44 this.emptyElement.className = "info";
45 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints"); 45 this.emptyElement.textContent = WebInspector.UIString("No Breakpoints");
46 46
47 this.bodyElement.appendChild(this.emptyElement); 47 this.bodyElement.appendChild(this.emptyElement);
48 } 48 }
49 49
50 WebInspector.NativeBreakpointsSidebarPane.prototype = { 50 WebInspector.NativeBreakpointsSidebarPane.prototype = {
51 _addListElement: function(element, beforeElement) 51 /**
52 * @param {!Element} element
53 * @param {?Element=} beforeElement
54 */
55 addListElement: function(element, beforeElement)
52 { 56 {
53 if (beforeElement) 57 if (beforeElement) {
54 this.listElement.insertBefore(element, beforeElement); 58 this.listElement.insertBefore(element, beforeElement);
55 else { 59 } else {
56 if (!this.listElement.firstChild) { 60 if (!this.listElement.firstChild) {
57 this.bodyElement.removeChild(this.emptyElement); 61 this.bodyElement.removeChild(this.emptyElement);
58 this.bodyElement.appendChild(this.listElement); 62 this.bodyElement.appendChild(this.listElement);
59 } 63 }
60 this.listElement.appendChild(element); 64 this.listElement.appendChild(element);
61 } 65 }
62 }, 66 },
63 67
64 _removeListElement: function(element) 68 /**
69 * @param {!Element} element
70 */
71 removeListElement: function(element)
65 { 72 {
66 this.listElement.removeChild(element); 73 this.listElement.removeChild(element);
67 if (!this.listElement.firstChild) { 74 if (!this.listElement.firstChild) {
68 this.bodyElement.removeChild(this.listElement); 75 this.bodyElement.removeChild(this.listElement);
69 this.bodyElement.appendChild(this.emptyElement); 76 this.bodyElement.appendChild(this.emptyElement);
70 } 77 }
71 }, 78 },
72 79
73 _reset: function() 80 reset: function()
74 { 81 {
75 this.listElement.removeChildren(); 82 this.listElement.removeChildren();
76 if (this.listElement.parentElement) { 83 if (this.listElement.parentElement) {
77 this.bodyElement.removeChild(this.listElement); 84 this.bodyElement.removeChild(this.listElement);
78 this.bodyElement.appendChild(this.emptyElement); 85 this.bodyElement.appendChild(this.emptyElement);
79 } 86 }
80 }, 87 },
81 88
82 __proto__: WebInspector.SidebarPane.prototype 89 __proto__: WebInspector.SidebarPane.prototype
83 } 90 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/components/FlameChart.js ('k') | Source/devtools/front_end/sdk/BreakpointManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698