Chromium Code Reviews

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

Issue 2155173003: Revert of Make the extension's sidebar pane auto-resizable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 174 matching lines...)
185 * @constructor 185 * @constructor
186 * @extends {WebInspector.SidebarPane} 186 * @extends {WebInspector.SidebarPane}
187 * @param {!WebInspector.ExtensionServer} server 187 * @param {!WebInspector.ExtensionServer} server
188 * @param {string} panelName 188 * @param {string} panelName
189 * @param {string} title 189 * @param {string} title
190 * @param {string} id 190 * @param {string} id
191 */ 191 */
192 WebInspector.ExtensionSidebarPane = function(server, panelName, title, id) 192 WebInspector.ExtensionSidebarPane = function(server, panelName, title, id)
193 { 193 {
194 WebInspector.SidebarPane.call(this, title); 194 WebInspector.SidebarPane.call(this, title);
195 this.element.classList.add("fill");
196 this._panelName = panelName; 195 this._panelName = panelName;
197 this._server = server; 196 this._server = server;
198 this._id = id; 197 this._id = id;
199 } 198 }
200 199
201 WebInspector.ExtensionSidebarPane.prototype = { 200 WebInspector.ExtensionSidebarPane.prototype = {
202 /** 201 /**
203 * @return {string} 202 * @return {string}
204 */ 203 */
205 id: function() 204 id: function()
(...skipping 40 matching lines...)
246 { 245 {
247 if (this._objectPropertiesView) { 246 if (this._objectPropertiesView) {
248 this._objectPropertiesView.detach(); 247 this._objectPropertiesView.detach();
249 delete this._objectPropertiesView; 248 delete this._objectPropertiesView;
250 } 249 }
251 if (this._extensionView) 250 if (this._extensionView)
252 this._extensionView.detach(true); 251 this._extensionView.detach(true);
253 252
254 this._extensionView = new WebInspector.ExtensionView(this._server, this. _id, url, "extension fill"); 253 this._extensionView = new WebInspector.ExtensionView(this._server, this. _id, url, "extension fill");
255 this._extensionView.show(this.element); 254 this._extensionView.show(this.element);
255
256 if (!this.element.style.height)
257 this.setHeight("150px");
256 }, 258 },
257 259
258 /** 260 /**
261 * @param {string} height
262 */
263 setHeight: function(height)
264 {
265 this.element.style.height = height;
266 },
267
268 /**
259 * @param {string} title 269 * @param {string} title
260 * @param {function(?string=)} callback 270 * @param {function(?string=)} callback
261 * @param {?Protocol.Error} error 271 * @param {?Protocol.Error} error
262 * @param {?WebInspector.RemoteObject} result 272 * @param {?WebInspector.RemoteObject} result
263 * @param {boolean=} wasThrown 273 * @param {boolean=} wasThrown
264 */ 274 */
265 _onEvaluate: function(title, callback, error, result, wasThrown) 275 _onEvaluate: function(title, callback, error, result, wasThrown)
266 { 276 {
267 if (error) 277 if (error)
268 callback(error.toString()); 278 callback(error.toString());
(...skipping 30 matching lines...)
299 if (!title) 309 if (!title)
300 section.titleLessMode(); 310 section.titleLessMode();
301 section.expand(); 311 section.expand();
302 section.editable = false; 312 section.editable = false;
303 this._objectPropertiesView.element.appendChild(section.element); 313 this._objectPropertiesView.element.appendChild(section.element);
304 callback(); 314 callback();
305 }, 315 },
306 316
307 __proto__: WebInspector.SidebarPane.prototype 317 __proto__: WebInspector.SidebarPane.prototype
308 } 318 }
OLDNEW

Powered by Google App Engine