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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/extensions/ExtensionPanel.js

Issue 2440953003: DevTools: use semicolons after each statement. (Closed)
Patch Set: rebaseline Created 4 years, 1 month 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 this._server = server; 43 this._server = server;
44 this._id = id; 44 this._id = id;
45 this.setHideOnDetach(); 45 this.setHideOnDetach();
46 this._panelToolbar = new WebInspector.Toolbar("hidden", this.element); 46 this._panelToolbar = new WebInspector.Toolbar("hidden", this.element);
47 47
48 this._searchableView = new WebInspector.SearchableView(this); 48 this._searchableView = new WebInspector.SearchableView(this);
49 this._searchableView.show(this.element); 49 this._searchableView.show(this.element);
50 50
51 var extensionView = new WebInspector.ExtensionView(server, this._id, pageURL , "extension"); 51 var extensionView = new WebInspector.ExtensionView(server, this._id, pageURL , "extension");
52 extensionView.show(this._searchableView.element); 52 extensionView.show(this._searchableView.element);
53 } 53 };
54 54
55 WebInspector.ExtensionPanel.prototype = { 55 WebInspector.ExtensionPanel.prototype = {
56 /** 56 /**
57 * @param {!WebInspector.ToolbarItem} item 57 * @param {!WebInspector.ToolbarItem} item
58 */ 58 */
59 addToolbarItem: function(item) 59 addToolbarItem: function(item)
60 { 60 {
61 this._panelToolbar.element.classList.remove("hidden"); 61 this._panelToolbar.element.classList.remove("hidden");
62 this._panelToolbar.appendToolbarItem(item); 62 this._panelToolbar.appendToolbarItem(item);
63 }, 63 },
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 /** 120 /**
121 * @override 121 * @override
122 * @return {boolean} 122 * @return {boolean}
123 */ 123 */
124 supportsRegexSearch: function() 124 supportsRegexSearch: function()
125 { 125 {
126 return false; 126 return false;
127 }, 127 },
128 128
129 __proto__: WebInspector.Panel.prototype 129 __proto__: WebInspector.Panel.prototype
130 } 130 };
131 131
132 /** 132 /**
133 * @constructor 133 * @constructor
134 * @param {!WebInspector.ExtensionServer} server 134 * @param {!WebInspector.ExtensionServer} server
135 * @param {string} id 135 * @param {string} id
136 * @param {string} iconURL 136 * @param {string} iconURL
137 * @param {string=} tooltip 137 * @param {string=} tooltip
138 * @param {boolean=} disabled 138 * @param {boolean=} disabled
139 */ 139 */
140 WebInspector.ExtensionButton = function(server, id, iconURL, tooltip, disabled) 140 WebInspector.ExtensionButton = function(server, id, iconURL, tooltip, disabled)
141 { 141 {
142 this._id = id; 142 this._id = id;
143 143
144 this._toolbarButton = new WebInspector.ToolbarButton("", ""); 144 this._toolbarButton = new WebInspector.ToolbarButton("", "");
145 this._toolbarButton.addEventListener("click", server.notifyButtonClicked.bin d(server, this._id)); 145 this._toolbarButton.addEventListener("click", server.notifyButtonClicked.bin d(server, this._id));
146 this.update(iconURL, tooltip, disabled); 146 this.update(iconURL, tooltip, disabled);
147 } 147 };
148 148
149 WebInspector.ExtensionButton.prototype = { 149 WebInspector.ExtensionButton.prototype = {
150 /** 150 /**
151 * @param {string} iconURL 151 * @param {string} iconURL
152 * @param {string=} tooltip 152 * @param {string=} tooltip
153 * @param {boolean=} disabled 153 * @param {boolean=} disabled
154 */ 154 */
155 update: function(iconURL, tooltip, disabled) 155 update: function(iconURL, tooltip, disabled)
156 { 156 {
157 if (typeof iconURL === "string") 157 if (typeof iconURL === "string")
158 this._toolbarButton.setBackgroundImage(iconURL); 158 this._toolbarButton.setBackgroundImage(iconURL);
159 if (typeof tooltip === "string") 159 if (typeof tooltip === "string")
160 this._toolbarButton.setTitle(tooltip); 160 this._toolbarButton.setTitle(tooltip);
161 if (typeof disabled === "boolean") 161 if (typeof disabled === "boolean")
162 this._toolbarButton.setEnabled(!disabled); 162 this._toolbarButton.setEnabled(!disabled);
163 }, 163 },
164 164
165 /** 165 /**
166 * @return {!WebInspector.ToolbarButton} 166 * @return {!WebInspector.ToolbarButton}
167 */ 167 */
168 toolbarButton: function() 168 toolbarButton: function()
169 { 169 {
170 return this._toolbarButton; 170 return this._toolbarButton;
171 } 171 }
172 } 172 };
173 173
174 /** 174 /**
175 * @constructor 175 * @constructor
176 * @extends {WebInspector.SimpleView} 176 * @extends {WebInspector.SimpleView}
177 * @param {!WebInspector.ExtensionServer} server 177 * @param {!WebInspector.ExtensionServer} server
178 * @param {string} panelName 178 * @param {string} panelName
179 * @param {string} title 179 * @param {string} title
180 * @param {string} id 180 * @param {string} id
181 */ 181 */
182 WebInspector.ExtensionSidebarPane = function(server, panelName, title, id) 182 WebInspector.ExtensionSidebarPane = function(server, panelName, title, id)
183 { 183 {
184 WebInspector.SimpleView.call(this, title); 184 WebInspector.SimpleView.call(this, title);
185 this.element.classList.add("fill"); 185 this.element.classList.add("fill");
186 this._panelName = panelName; 186 this._panelName = panelName;
187 this._server = server; 187 this._server = server;
188 this._id = id; 188 this._id = id;
189 } 189 };
190 190
191 WebInspector.ExtensionSidebarPane.prototype = { 191 WebInspector.ExtensionSidebarPane.prototype = {
192 /** 192 /**
193 * @return {string} 193 * @return {string}
194 */ 194 */
195 id: function() 195 id: function()
196 { 196 {
197 return this._id; 197 return this._id;
198 }, 198 },
199 199
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 var section = new WebInspector.ObjectPropertiesSection(object, title); 299 var section = new WebInspector.ObjectPropertiesSection(object, title);
300 if (!title) 300 if (!title)
301 section.titleLessMode(); 301 section.titleLessMode();
302 section.expand(); 302 section.expand();
303 section.editable = false; 303 section.editable = false;
304 this._objectPropertiesView.element.appendChild(section.element); 304 this._objectPropertiesView.element.appendChild(section.element);
305 callback(); 305 callback();
306 }, 306 },
307 307
308 __proto__: WebInspector.SimpleView.prototype 308 __proto__: WebInspector.SimpleView.prototype
309 } 309 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698