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

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

Issue 10825012: chromeos: Fix pixelated icons in app list and launcher (part 2) (by xiyuan) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/extensions/app_shortcut_manager.cc
diff --git a/chrome/browser/extensions/app_shortcut_manager.cc b/chrome/browser/extensions/app_shortcut_manager.cc
index cdf2ce2e8d54476110471b9401ff15f80737ee87..9eb006053c91f11960cf2e4a7a118f059a7758e6 100644
--- a/chrome/browser/extensions/app_shortcut_manager.cc
+++ b/chrome/browser/extensions/app_shortcut_manager.cc
@@ -106,14 +106,17 @@ void AppShortcutManager::InstallApplicationShortcuts(
shortcut_info_.create_on_desktop = true;
shortcut_info_.profile_path = profile_->GetPath();
- std::vector<ImageLoadingTracker::ImageInfo> info_list;
+ std::vector<ImageLoadingTracker::ImageRepresentation> info_list;
for (size_t i = 0; i < arraysize(kDesiredSizes); ++i) {
int size = kDesiredSizes[i];
ExtensionResource resource = extension->GetIconResource(
size, ExtensionIconSet::MATCH_EXACTLY);
if (!resource.empty()) {
- info_list.push_back(
- ImageLoadingTracker::ImageInfo(resource, gfx::Size(size, size)));
+ info_list.push_back(ImageLoadingTracker::ImageRepresentation(
+ resource,
+ ImageLoadingTracker::ImageRepresentation::RESIZE_WHEN_LARGER,
+ gfx::Size(size, size),
+ ui::SCALE_FACTOR_100P));
}
}
@@ -130,8 +133,11 @@ void AppShortcutManager::InstallApplicationShortcuts(
resource = extension->GetIconResource(
size, ExtensionIconSet::MATCH_SMALLER);
}
- info_list.push_back(
- ImageLoadingTracker::ImageInfo(resource, gfx::Size(size, size)));
+ info_list.push_back(ImageLoadingTracker::ImageRepresentation(
+ resource,
+ ImageLoadingTracker::ImageRepresentation::RESIZE_WHEN_LARGER,
+ gfx::Size(size, size),
+ ui::SCALE_FACTOR_100P));
}
// |icon_resources| may still be empty at this point, in which case LoadImage
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_icon_image.h » ('j') | chrome/browser/extensions/extension_icon_image.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698