Chromium Code Reviews| Index: chrome/browser/resources/extensions/extensions.js |
| diff --git a/chrome/browser/resources/extensions/extensions.js b/chrome/browser/resources/extensions/extensions.js |
| index e094312bba88eb769323613216a95ca2a3c30158..f95e625223554fd7b7184470b5991df4247b3b9b 100644 |
| --- a/chrome/browser/resources/extensions/extensions.js |
| +++ b/chrome/browser/resources/extensions/extensions.js |
| @@ -274,14 +274,24 @@ cr.define('extensions', function() { |
| document.documentElement.classList.remove('loading'); |
| }, 0); |
| - /** @const */ |
| - var hasExtensions = extensionList.getNumExtensions() != 0; |
| - $('no-extensions').hidden = hasExtensions; |
| - $('extension-list-wrapper').hidden = !hasExtensions; |
| + extensionList.onExtensionCountChanged = |
| + this.updateListVisibility_.bind(this); |
| + this.updateListVisibility_(); |
|
Dan Beam
2015/04/27 16:17:05
why does the |this| matter at all for this method?
|
| }.bind(this)); |
| }, |
| /** |
| + * Updates the visibility of the extension list and "Boo..." message. |
| + * @private |
| + */ |
| + updateListVisibility_: function() { |
|
Dan Beam
2015/04/27 16:17:05
make this static
Devlin
2015/04/27 18:28:30
Now, since this is a delegate method, I don't thin
Dan Beam
2015/04/27 18:47:59
fine as is
|
| + /** @const */ |
| + var hasExtensions = $('extension-settings-list').getNumExtensions() != 0; |
| + $('no-extensions').hidden = hasExtensions; |
| + $('extension-list-wrapper').hidden = !hasExtensions; |
| + }, |
| + |
| + /** |
| * Handles the Pack Extension button. |
| * @param {Event} e Change event. |
| * @private |