| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 var button = new WebInspector.ExtensionButton(this, message.id, this._ex
pandResourcePath(port._extensionOrigin, message.icon), message.tooltip, message.
disabled); | 287 var button = new WebInspector.ExtensionButton(this, message.id, this._ex
pandResourcePath(port._extensionOrigin, message.icon), message.tooltip, message.
disabled); |
| 288 this._clientObjects[message.id] = button; | 288 this._clientObjects[message.id] = button; |
| 289 | 289 |
| 290 panelDescriptor.panel().then(appendButton).done(); | 290 panelDescriptor.panel().then(appendButton).done(); |
| 291 | 291 |
| 292 /** | 292 /** |
| 293 * @param {!WebInspector.Panel} panel | 293 * @param {!WebInspector.Panel} panel |
| 294 */ | 294 */ |
| 295 function appendButton(panel) | 295 function appendButton(panel) |
| 296 { | 296 { |
| 297 /** @type {!WebInspector.ExtensionPanel} panel*/ (panel).addStatusBa
rItem(button.element); | 297 /** @type {!WebInspector.ExtensionPanel} panel*/ (panel).addStatusBa
rItem(button.statusBarButton()); |
| 298 } | 298 } |
| 299 | 299 |
| 300 return this._status.OK(); | 300 return this._status.OK(); |
| 301 }, | 301 }, |
| 302 | 302 |
| 303 _onUpdateButton: function(message, port) | 303 _onUpdateButton: function(message, port) |
| 304 { | 304 { |
| 305 var button = this._clientObjects[message.id]; | 305 var button = this._clientObjects[message.id]; |
| 306 if (!button || !(button instanceof WebInspector.ExtensionButton)) | 306 if (!button || !(button instanceof WebInspector.ExtensionButton)) |
| 307 return this._status.E_NOTFOUND(message.id); | 307 return this._status.E_NOTFOUND(message.id); |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 this.E_FAILED = makeStatus.bind(null, "E_FAILED", "Operation failed: %s"); | 1124 this.E_FAILED = makeStatus.bind(null, "E_FAILED", "Operation failed: %s"); |
| 1125 } | 1125 } |
| 1126 | 1126 |
| 1127 /** | 1127 /** |
| 1128 * @typedef {{code: string, description: string, details: !Array.<*>}} | 1128 * @typedef {{code: string, description: string, details: !Array.<*>}} |
| 1129 */ | 1129 */ |
| 1130 WebInspector.ExtensionStatus.Record; | 1130 WebInspector.ExtensionStatus.Record; |
| 1131 | 1131 |
| 1132 WebInspector.extensionAPI = {}; | 1132 WebInspector.extensionAPI = {}; |
| 1133 defineCommonExtensionSymbols(WebInspector.extensionAPI); | 1133 defineCommonExtensionSymbols(WebInspector.extensionAPI); |
| OLD | NEW |