| OLD | NEW |
| 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...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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"); |
| 195 this._panelName = panelName; | 196 this._panelName = panelName; |
| 196 this._server = server; | 197 this._server = server; |
| 197 this._id = id; | 198 this._id = id; |
| 198 } | 199 } |
| 199 | 200 |
| 200 WebInspector.ExtensionSidebarPane.prototype = { | 201 WebInspector.ExtensionSidebarPane.prototype = { |
| 201 /** | 202 /** |
| 202 * @return {string} | 203 * @return {string} |
| 203 */ | 204 */ |
| 204 id: function() | 205 id: function() |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 { | 246 { |
| 246 if (this._objectPropertiesView) { | 247 if (this._objectPropertiesView) { |
| 247 this._objectPropertiesView.detach(); | 248 this._objectPropertiesView.detach(); |
| 248 delete this._objectPropertiesView; | 249 delete this._objectPropertiesView; |
| 249 } | 250 } |
| 250 if (this._extensionView) | 251 if (this._extensionView) |
| 251 this._extensionView.detach(true); | 252 this._extensionView.detach(true); |
| 252 | 253 |
| 253 this._extensionView = new WebInspector.ExtensionView(this._server, this.
_id, url, "extension fill"); | 254 this._extensionView = new WebInspector.ExtensionView(this._server, this.
_id, url, "extension fill"); |
| 254 this._extensionView.show(this.element); | 255 this._extensionView.show(this.element); |
| 255 | |
| 256 if (!this.element.style.height) | |
| 257 this.setHeight("150px"); | |
| 258 }, | 256 }, |
| 259 | 257 |
| 260 /** | 258 /** |
| 261 * @param {string} height | |
| 262 */ | |
| 263 setHeight: function(height) | |
| 264 { | |
| 265 this.element.style.height = height; | |
| 266 }, | |
| 267 | |
| 268 /** | |
| 269 * @param {string} title | 259 * @param {string} title |
| 270 * @param {function(?string=)} callback | 260 * @param {function(?string=)} callback |
| 271 * @param {?Protocol.Error} error | 261 * @param {?Protocol.Error} error |
| 272 * @param {?WebInspector.RemoteObject} result | 262 * @param {?WebInspector.RemoteObject} result |
| 273 * @param {boolean=} wasThrown | 263 * @param {boolean=} wasThrown |
| 274 */ | 264 */ |
| 275 _onEvaluate: function(title, callback, error, result, wasThrown) | 265 _onEvaluate: function(title, callback, error, result, wasThrown) |
| 276 { | 266 { |
| 277 if (error) | 267 if (error) |
| 278 callback(error.toString()); | 268 callback(error.toString()); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 309 if (!title) | 299 if (!title) |
| 310 section.titleLessMode(); | 300 section.titleLessMode(); |
| 311 section.expand(); | 301 section.expand(); |
| 312 section.editable = false; | 302 section.editable = false; |
| 313 this._objectPropertiesView.element.appendChild(section.element); | 303 this._objectPropertiesView.element.appendChild(section.element); |
| 314 callback(); | 304 callback(); |
| 315 }, | 305 }, |
| 316 | 306 |
| 317 __proto__: WebInspector.SidebarPane.prototype | 307 __proto__: WebInspector.SidebarPane.prototype |
| 318 } | 308 } |
| OLD | NEW |