Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: chrome/browser/resources/extensions/extension_options_overlay.js

Issue 488293003: Embedded Extension Options: Improve the overlay popup UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/extensions/extension_options_overlay.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 08949bbf609446205b6e01b9c25819c16e104ddd..b9614f374a1e2defcd7520d5ff1c772f1fa44ef7 100644
--- a/chrome/browser/resources/extensions/extension_options_overlay.js
+++ b/chrome/browser/resources/extensions/extension_options_overlay.js
@@ -53,6 +53,8 @@ cr.define('extensions', function() {
if (extensionoptions)
$('extension-options-overlay-guest').removeChild(extensionoptions);
+
+ $('extension-options-overlay-icon').removeAttribute('src');
},
/**
@@ -61,9 +63,15 @@ 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;
+ $('extension-options-overlay-icon').src = extensionIcon;
+
+ this.setVisible_(true);
var extensionoptions = new ExtensionOptions();
extensionoptions.extension = extensionId;
@@ -74,7 +82,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;
@@ -131,7 +139,6 @@ cr.define('extensions', function() {
window.outerWidth + 'px';
$('extension-options-overlay-guest').appendChild(extensionoptions);
- this.setVisible_(true);
},
/**
« no previous file with comments | « chrome/browser/resources/extensions/extension_options_overlay.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698