Chromium Code Reviews| Index: chrome/browser/resources/extensions/extension_list.js |
| diff --git a/chrome/browser/resources/extensions/extension_list.js b/chrome/browser/resources/extensions/extension_list.js |
| index 637707e0c31e87a92bde6a91c51f53dabc31af1c..2a04ea0db1b7827c73e7befb110b6f6bd59d48ad 100644 |
| --- a/chrome/browser/resources/extensions/extension_list.js |
| +++ b/chrome/browser/resources/extensions/extension_list.js |
| @@ -290,6 +290,25 @@ cr.define('extensions', function() { |
| return this.extensionsUpdated_; |
| }, |
| + /** |
| + * Updates any element that needs to be visible to update properly. |
| + * @param {boolean} visible Whether the extension list is visible. |
| + */ |
| + updateVisibility: function(visible) { |
| + if (!visible) |
|
Dan Beam
2015/04/14 20:33:56
i guess I see why you're doing this but it's certa
not at google - send to devlin
2015/04/14 20:38:50
Yeah - it looks odd to me to only be using the par
hcarmona
2015/04/14 21:03:17
Moved the visibility check to the call site and re
|
| + return; |
| + |
| + this.updateFocusableElements(); |
| + |
| + var idToHighlight = this.getIdQueryParam_(); |
| + if (idToHighlight && $(idToHighlight)) |
| + this.scrollToNode_(idToHighlight); |
| + |
| + var idToOpenOptions = this.getOptionsQueryParam_(); |
| + if (idToOpenOptions && $(idToOpenOptions)) |
| + this.showEmbeddedExtensionOptions_(idToOpenOptions, true); |
| + }, |
| + |
| /** @return {number} The number of extensions being displayed. */ |
| getNumExtensions: function() { |
| return this.extensions_.length; |
| @@ -338,14 +357,6 @@ cr.define('extensions', function() { |
| assertInstanceof(node, ExtensionFocusRow).destroy(); |
| } |
| } |
| - |
| - var idToHighlight = this.getIdQueryParam_(); |
| - if (idToHighlight && $(idToHighlight)) |
| - this.scrollToNode_(idToHighlight); |
| - |
| - var idToOpenOptions = this.getOptionsQueryParam_(); |
| - if (idToOpenOptions && $(idToOpenOptions)) |
| - this.showEmbeddedExtensionOptions_(idToOpenOptions, true); |
| }, |
| /** Updates each row's focusable elements without rebuilding the grid. */ |