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

Unified Diff: chrome/browser/ui/ash/app_list/extension_app_item.cc

Issue 10820049: Load 2x resources on demand (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For preview Created 8 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
Index: chrome/browser/ui/ash/app_list/extension_app_item.cc
diff --git a/chrome/browser/ui/ash/app_list/extension_app_item.cc b/chrome/browser/ui/ash/app_list/extension_app_item.cc
index e228db51e571bd6e5b35000b31cefb885e718dd4..3ddbc72350fd82948356a7f7a2df0aee307fdf1d 100644
--- a/chrome/browser/ui/ash/app_list/extension_app_item.cc
+++ b/chrome/browser/ui/ash/app_list/extension_app_item.cc
@@ -169,10 +169,16 @@ void ExtensionAppItem::StartExtensionUninstall() {
void ExtensionAppItem::OnImageLoaded(const gfx::Image& image,
const std::string& extension_id,
int tracker_index) {
- if (!image.IsEmpty())
- SetIcon(*image.ToImageSkia());
- else
- SetIcon(Extension::GetDefaultIcon(true /* is_app */));
+ LOG(ERROR) << "empty:" << image.IsEmpty();
+ if (!image.IsEmpty()) {
+ gfx::ImageSkia image_skia = *image.ToImageSkia();
+ image_skia.SetReadOnly();
+ SetIcon(image_skia);
+ } else {
+ gfx::ImageSkia image_skia(Extension::GetDefaultIcon(true /* is_app */));
+ image_skia.SetReadOnly();
+ SetIcon(image_skia);
+ }
}
bool ExtensionAppItem::IsItemForCommandIdDynamic(int command_id) const {

Powered by Google App Engine
This is Rietveld 408576698