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

Unified Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc

Issue 1916883003: Default icon should use the image skia created by ResourceBundle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« 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/ui/views/apps/app_info_dialog/app_info_header_panel.cc
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc
index a14bb9de90653d0699308e9493c158915a4b4d10..655ba9374796314726914031e964d97ef422fe8f 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc
@@ -117,16 +117,10 @@ void AppInfoHeaderPanel::LoadAppImageAsync() {
}
void AppInfoHeaderPanel::OnAppImageLoaded(const gfx::Image& image) {
- const SkBitmap* bitmap;
- if (image.IsEmpty()) {
- bitmap = &extensions::util::GetDefaultAppIcon()
- .GetRepresentation(gfx::ImageSkia::GetMaxSupportedScale())
- .sk_bitmap();
- } else {
- bitmap = image.ToSkBitmap();
- }
-
- app_icon_->SetImage(gfx::ImageSkia::CreateFrom1xBitmap(*bitmap));
+ if (image.IsEmpty())
+ app_icon_->SetImage(extensions::util::GetDefaultAppIcon());
+ else
+ app_icon_->SetImage(image.AsImageSkia());
}
void AppInfoHeaderPanel::ShowAppInWebStore() {
« 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