Chromium Code Reviews| Index: chrome/browser/resources/extensions/extension_options_overlay.js |
| diff --git a/chrome/browser/resources/extensions/extension_options_overlay.js b/chrome/browser/resources/extensions/extension_options_overlay.js |
| index 9af2c20da2aff4a4560ddb86d878c4be3aee0bd0..abf5d2b4af7e7a5bfd7250cd3098863c7a68b33c 100644 |
| --- a/chrome/browser/resources/extensions/extension_options_overlay.js |
| +++ b/chrome/browser/resources/extensions/extension_options_overlay.js |
| @@ -50,6 +50,10 @@ cr.define('extensions', function() { |
| var extensionoptions = document.querySelector('extensionoptions'); |
| if (extensionoptions) |
| $('extension-options-overlay-guest').removeChild(extensionoptions); |
| + |
| + var icon = $('extension-options-overlay-icon').querySelector('img'); |
| + if (icon) |
| + $('extension-options-overlay-icon').removeChild(icon); |
|
not at google - send to devlin
2014/08/22 22:31:00
Should we basically be removing #extension-options
ericzeng
2014/08/23 00:14:50
No, every overlay's nodes remain in the DOM (not j
|
| }, |
| /** |
| @@ -58,10 +62,19 @@ cr.define('extensions', function() { |
| * should be displayed in the overlay. |
| * @param {string} extensionName The name of the extension, which is used |
| * as the header of the overlay. |
| + * @param {string} extensionIcon The URL of the extension's icon. |
| */ |
| - setExtensionAndShowOverlay: function(extensionId, extensionName) { |
| + setExtensionAndShowOverlay: function(extensionId, |
| + extensionName, |
| + extensionIcon) { |
| $('extension-options-overlay-title').textContent = extensionName; |
| + var icon = document.createElement('img'); |
| + icon.setAttribute('src', extensionIcon); |
| + $('extension-options-overlay-icon').appendChild(icon); |
|
not at google - send to devlin
2014/08/22 22:31:00
Why not always have the img in the DOM, then set t
ericzeng
2014/08/23 00:14:50
Done
|
| + |
| + this.setVisible_(true); |
| + |
| var extensionoptions = new ExtensionOptions(); |
| extensionoptions.extension = extensionId; |
| extensionoptions.autosize = 'on'; |
| @@ -71,7 +84,7 @@ cr.define('extensions', function() { |
| // max height, but the maxheight does not include our header height |
| // (title and close button), so we need to subtract that to get the |
| // max height for the extension options. |
| - var headerHeight = $('extension-options-overlay-title').offsetHeight; |
| + var headerHeight = $('extension-options-overlay-header').offsetHeight; |
| var overlayMaxHeight = |
| parseInt($('extension-options-overlay').style.maxHeight); |
| extensionoptions.maxheight = overlayMaxHeight - headerHeight; |
| @@ -122,7 +135,6 @@ cr.define('extensions', function() { |
| window.outerWidth + 'px'; |
| $('extension-options-overlay-guest').appendChild(extensionoptions); |
| - this.setVisible_(true); |
| }, |
| /** |