OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** @typedef {{active: boolean, | 5 /** @typedef {{active: boolean, |
6 * command_name: string, | 6 * command_name: string, |
7 * description: string, | 7 * description: string, |
8 * extension_action: boolean, | 8 * extension_action: boolean, |
9 * extension_id: string, | 9 * extension_id: string, |
10 * global: boolean, | 10 * global: boolean, |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 oldValue_: '', | 205 oldValue_: '', |
206 | 206 |
207 /** | 207 /** |
208 * While capturing, this keeps track of which element the user asked to | 208 * While capturing, this keeps track of which element the user asked to |
209 * change. | 209 * change. |
210 * @type {HTMLElement}. | 210 * @type {HTMLElement}. |
211 * @private | 211 * @private |
212 */ | 212 */ |
213 capturingElement_: null, | 213 capturingElement_: null, |
214 | 214 |
215 /** @override */ | |
216 decorate: function() { | 215 decorate: function() { |
217 this.textContent = ''; | 216 this.textContent = ''; |
218 | 217 |
219 // Iterate over the extension data and add each item to the list. | 218 // Iterate over the extension data and add each item to the list. |
220 this.data_.commands.forEach(this.createNodeForExtension_.bind(this)); | 219 this.data_.commands.forEach(this.createNodeForExtension_.bind(this)); |
221 }, | 220 }, |
222 | 221 |
223 /** | 222 /** |
224 * Synthesizes and initializes an HTML element for the extension command | 223 * Synthesizes and initializes an HTML element for the extension command |
225 * metadata given in |extension|. | 224 * metadata given in |extension|. |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 namespace.length + 1 + kExtensionIdLength), | 552 namespace.length + 1 + kExtensionIdLength), |
554 commandName: id.substring(namespace.length + 1 + kExtensionIdLength + 1) | 553 commandName: id.substring(namespace.length + 1 + kExtensionIdLength + 1) |
555 }; | 554 }; |
556 }, | 555 }, |
557 }; | 556 }; |
558 | 557 |
559 return { | 558 return { |
560 ExtensionCommandList: ExtensionCommandList | 559 ExtensionCommandList: ExtensionCommandList |
561 }; | 560 }; |
562 }); | 561 }); |
OLD | NEW |