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

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

Issue 816223008: Update UI for WebStore bundle installs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bundles_api
Patch Set: style fix Created 5 years, 8 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
Index: chrome/browser/extensions/extension_install_prompt.cc
diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc
index 1f44cb5f1436a430fb7811d19e49d02f1b150b4b..6ad435873ddd705f545819bd782e404f6de0eeed 100644
--- a/chrome/browser/extensions/extension_install_prompt.cc
+++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -665,6 +665,7 @@ ExtensionInstallPrompt::~ExtensionInstallPrompt() {
void ExtensionInstallPrompt::ConfirmBundleInstall(
extensions::BundleInstaller* bundle,
+ const SkBitmap* icon,
const PermissionSet* permissions) {
DCHECK(ui_loop_ == base::MessageLoop::current());
bundle_ = bundle;
@@ -672,6 +673,7 @@ void ExtensionInstallPrompt::ConfirmBundleInstall(
delegate_ = bundle;
prompt_ = new Prompt(BUNDLE_INSTALL_PROMPT);
+ SetIcon(icon);
ShowConfirmation();
}
@@ -831,7 +833,8 @@ void ExtensionInstallPrompt::SetIcon(const SkBitmap* image) {
// Let's set default icon bitmap whose size is equal to the default icon's
// pixel size under maximal supported scale factor. If the bitmap is larger
// than the one we need, it will be scaled down by the ui code.
- icon_ = GetDefaultIconBitmapForMaxScaleFactor(extension_->is_app());
+ icon_ = GetDefaultIconBitmapForMaxScaleFactor(
+ extension_ ? extension_->is_app() : false);
}
}
@@ -926,7 +929,6 @@ void ExtensionInstallPrompt::ShowConfirmation() {
case REPAIR_PROMPT:
case DELEGATED_PERMISSIONS_PROMPT: {
prompt_->set_extension(extension_);
- prompt_->set_icon(gfx::Image::CreateFrom1xBitmap(icon_));
prompt_->set_delegated_username(delegated_username_);
break;
}
@@ -938,6 +940,7 @@ void ExtensionInstallPrompt::ShowConfirmation() {
NOTREACHED() << "Unknown message";
return;
}
+ prompt_->set_icon(gfx::Image::CreateFrom1xBitmap(icon_));
g_last_prompt_type_for_tests = prompt_->type();
« no previous file with comments | « chrome/browser/extensions/extension_install_prompt.h ('k') | chrome/browser/ui/cocoa/extensions/bundle_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698