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

Unified Diff: chrome/browser/extensions/extension_install_ui.cc

Issue 5690004: Fix bug where icon is not displayed in extension install bubbles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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/extensions/extension_install_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_install_ui.cc
diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc
index 313a21a6093e052b8e06c889a811782f8dafb96a..f0634d33356b668bb919e41972bcc13c239bed70 100644
--- a/chrome/browser/extensions/extension_install_ui.cc
+++ b/chrome/browser/extensions/extension_install_ui.cc
@@ -122,7 +122,11 @@ void ExtensionInstallUI::ConfirmUninstall(Delegate* delegate,
ShowConfirmation(UNINSTALL_PROMPT);
}
-void ExtensionInstallUI::OnInstallSuccess(const Extension* extension) {
+void ExtensionInstallUI::OnInstallSuccess(const Extension* extension,
+ SkBitmap* icon) {
+ extension_ = extension;
+ SetIcon(icon);
+
if (extension->is_theme()) {
ShowThemeInfoBar(previous_theme_id_, previous_use_system_theme_,
extension, profile_);
@@ -181,8 +185,7 @@ void ExtensionInstallUI::OnInstallFailure(const std::string& error) {
UTF8ToUTF16(error));
}
-void ExtensionInstallUI::OnImageLoaded(
- SkBitmap* image, ExtensionResource resource, int index) {
+void ExtensionInstallUI::SetIcon(SkBitmap* image) {
if (image)
icon_ = *image;
else
@@ -196,6 +199,11 @@ void ExtensionInstallUI::OnImageLoaded(
IDR_EXTENSION_DEFAULT_ICON);
}
}
+}
+
+void ExtensionInstallUI::OnImageLoaded(
+ SkBitmap* image, ExtensionResource resource, int index) {
+ SetIcon(image);
switch (prompt_type_) {
case INSTALL_PROMPT: {
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698