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

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

Issue 2034293002: Just use the image skia from resouce bundle for default app icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_uninstall_dialog.cc
diff --git a/chrome/browser/extensions/extension_uninstall_dialog.cc b/chrome/browser/extensions/extension_uninstall_dialog.cc
index 36552a06d3fb7316ef20fc8712a0dba60971fb90..d302b5162511797dbe04974e820b3605c5c73d86 100644
--- a/chrome/browser/extensions/extension_uninstall_dialog.cc
+++ b/chrome/browser/extensions/extension_uninstall_dialog.cc
@@ -41,13 +41,9 @@ const char kExtensionRemovedError[] =
const char kReferrerId[] = "chrome-remove-extension-dialog";
-// Returns bitmap for the default icon with size equal to the default icon's
-// pixel size under maximal supported scale factor.
-SkBitmap GetDefaultIconBitmapForMaxScaleFactor(bool is_app) {
- const gfx::ImageSkia& image =
- is_app ? util::GetDefaultAppIcon() : util::GetDefaultExtensionIcon();
- return image.GetRepresentation(
- gfx::ImageSkia::GetMaxSupportedScale()).sk_bitmap();
+// Returns gfx::ImageSkia for the default icon.
+gfx::ImageSkia GetDefaultIconImage(bool is_app) {
+ return is_app ? util::GetDefaultAppIcon() : util::GetDefaultExtensionIcon();
}
} // namespace
@@ -107,13 +103,7 @@ void ExtensionUninstallDialog::ConfirmUninstall(
void ExtensionUninstallDialog::SetIcon(const gfx::Image& image) {
if (image.IsEmpty()) {
- // 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.
- // TODO(tbarzic): We should use IconImage here and load the required bitmap
- // lazily.
- icon_ = gfx::ImageSkia::CreateFrom1xBitmap(
- GetDefaultIconBitmapForMaxScaleFactor(extension_->is_app()));
+ icon_ = GetDefaultIconImage(extension_->is_app());
} else {
icon_ = *image.ToImageSkia();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698