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

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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_icon_image.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6d8fc81656d41ba09b50568b643fabf5760c487d..2be6efebfef419f144f69b1b59fbc5f85f90da44 100644
--- a/chrome/browser/extensions/app_shortcut_manager.cc
+++ b/chrome/browser/extensions/app_shortcut_manager.cc
@@ -113,14 +113,18 @@ void AppShortcutManager::SetShortcutCreationDisabledForTesting(bool disabled) {
void AppShortcutManager::InstallApplicationShortcuts(
const Extension* extension) {
shortcut_info_ = ShortcutInfoForExtensionAndProfile(extension, profile_);
- 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));
}
}
@@ -137,8 +141,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698