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

Unified Diff: chrome/browser/ui/webui/fileicon_source.cc

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new usage of scale in FastShowPickler Created 7 years, 3 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/webui/fileicon_source.cc
diff --git a/chrome/browser/ui/webui/fileicon_source.cc b/chrome/browser/ui/webui/fileicon_source.cc
index ee0cb1168a5ea3aa31a0d62df4ab57d042b3df5c..1705c41874a121d9d00d553bbbe3c7c7f554104f 100644
--- a/chrome/browser/ui/webui/fileicon_source.cc
+++ b/chrome/browser/ui/webui/fileicon_source.cc
@@ -103,7 +103,8 @@ void FileIconSource::FetchFileIcon(
if (icon) {
scoped_refptr<base::RefCountedBytes> icon_data(new base::RefCountedBytes);
gfx::PNGCodec::EncodeBGRASkBitmap(
- icon->ToImageSkia()->GetRepresentation(scale_factor).sk_bitmap(),
+ icon->ToImageSkia()->GetRepresentation(
+ ui::GetImageScale(scale_factor)).sk_bitmap(),
false, &icon_data->data());
callback.Run(icon_data.get());
@@ -150,8 +151,8 @@ void FileIconSource::OnFileIconDataAvailable(const IconRequestDetails& details,
if (icon) {
scoped_refptr<base::RefCountedBytes> icon_data(new base::RefCountedBytes);
gfx::PNGCodec::EncodeBGRASkBitmap(
- icon->ToImageSkia()->GetRepresentation(details.scale_factor)
- .sk_bitmap(),
+ icon->ToImageSkia()->GetRepresentation(
+ ui::GetImageScale(details.scale_factor)).sk_bitmap(),
false,
&icon_data->data());
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_dropdown.cc ('k') | chrome/browser/ui/webui/ntp/ntp_login_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698