| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 this.element.title = tooltip; | 138 this.element.title = tooltip; |
| 139 if (typeof disabled === "boolean") | 139 if (typeof disabled === "boolean") |
| 140 this.element.disabled = disabled; | 140 this.element.disabled = disabled; |
| 141 } | 141 } |
| 142 } | 142 } |
| 143 | 143 |
| 144 /** | 144 /** |
| 145 * @constructor | 145 * @constructor |
| 146 * @extends {WebInspector.SidebarPane} | 146 * @extends {WebInspector.SidebarPane} |
| 147 * @param {!WebInspector.ExtensionServer} server | 147 * @param {!WebInspector.ExtensionServer} server |
| 148 * @param {string} panelName |
| 148 * @param {string} title | 149 * @param {string} title |
| 149 * @param {string} id | 150 * @param {string} id |
| 150 */ | 151 */ |
| 151 WebInspector.ExtensionSidebarPane = function(server, title, id) | 152 WebInspector.ExtensionSidebarPane = function(server, panelName, title, id) |
| 152 { | 153 { |
| 153 WebInspector.SidebarPane.call(this, title); | 154 WebInspector.SidebarPane.call(this, title); |
| 154 this.setHideOnDetach(); | 155 this.setHideOnDetach(); |
| 156 this._panelName = panelName; |
| 155 this._server = server; | 157 this._server = server; |
| 156 this._id = id; | 158 this._id = id; |
| 157 } | 159 } |
| 158 | 160 |
| 159 WebInspector.ExtensionSidebarPane.prototype = { | 161 WebInspector.ExtensionSidebarPane.prototype = { |
| 160 /** | 162 /** |
| 163 * @return {string} |
| 164 */ |
| 165 id: function() |
| 166 { |
| 167 return this._id; |
| 168 }, |
| 169 |
| 170 /** |
| 171 * @return {string} |
| 172 */ |
| 173 panelName: function() |
| 174 { |
| 175 return this._panelName; |
| 176 }, |
| 177 |
| 178 /** |
| 161 * @param {!Object} object | 179 * @param {!Object} object |
| 162 * @param {string} title | 180 * @param {string} title |
| 163 * @param {function(?string=)} callback | 181 * @param {function(?string=)} callback |
| 164 */ | 182 */ |
| 165 setObject: function(object, title, callback) | 183 setObject: function(object, title, callback) |
| 166 { | 184 { |
| 167 this._createObjectPropertiesView(); | 185 this._createObjectPropertiesView(); |
| 168 this._setObject(WebInspector.RemoteObject.fromLocalObject(object), title
, callback); | 186 this._setObject(WebInspector.RemoteObject.fromLocalObject(object), title
, callback); |
| 169 }, | 187 }, |
| 170 | 188 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 if (!title) | 270 if (!title) |
| 253 section.headerElement.classList.add("hidden"); | 271 section.headerElement.classList.add("hidden"); |
| 254 section.expanded = true; | 272 section.expanded = true; |
| 255 section.editable = false; | 273 section.editable = false; |
| 256 this._objectPropertiesView.element.appendChild(section.element); | 274 this._objectPropertiesView.element.appendChild(section.element); |
| 257 callback(); | 275 callback(); |
| 258 }, | 276 }, |
| 259 | 277 |
| 260 __proto__: WebInspector.SidebarPane.prototype | 278 __proto__: WebInspector.SidebarPane.prototype |
| 261 } | 279 } |
| OLD | NEW |