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

Unified Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename methods and vars to make image_scale more clear 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/options/chromeos/internet_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
index 6c19b832edd1cce08dfe083264fb7650f9a98e22..e1bb3799aee0edbad5bbd053724ca355e36f8d34 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -433,7 +433,8 @@ class NetworkInfoDictionary {
private:
void SetIcon(const gfx::ImageSkia& icon,
ui::ScaleFactor icon_scale_factor) {
- gfx::ImageSkiaRep image_rep = icon.GetRepresentation(icon_scale_factor);
+ gfx::ImageSkiaRep image_rep
+ = icon.GetRepresentation(ui::GetImageScale(icon_scale_factor));
icon_url_ = icon.isNull() ? "" : webui::GetBitmapDataUrl(
image_rep.sk_bitmap());
}
@@ -1281,7 +1282,7 @@ std::string InternetOptionsHandler::GetIconDataUrl(int resource_id) const {
gfx::ImageSkia* icon =
ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id);
gfx::ImageSkiaRep image_rep = icon->GetRepresentation(
- web_ui()->GetDeviceScaleFactor());
+ ui::GetImageScale(web_ui()->GetDeviceScaleFactor()));
return webui::GetBitmapDataUrl(image_rep.sk_bitmap());
}

Powered by Google App Engine
This is Rietveld 408576698