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

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: 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
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_login_handler.cc ('k') | chrome/common/badge_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bc82a94cc6b38f08677be9534fcaa06b0118e35f..218d24a671c0233ce8061de03b3cae7a875abf11 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -416,7 +416,8 @@ void SetCommonNetworkInfo(const ManagedState* state,
const gfx::ImageSkia& icon,
ui::ScaleFactor icon_scale_factor,
base::DictionaryValue* network_info) {
- gfx::ImageSkiaRep image_rep = icon.GetRepresentation(icon_scale_factor);
+ gfx::ImageSkiaRep image_rep =
+ icon.GetRepresentation(ui::GetImageScale(icon_scale_factor));
std::string icon_url =
icon.isNull() ? "" : webui::GetBitmapDataUrl(image_rep.sk_bitmap());
network_info->SetString(kNetworkInfoKeyIconURL, icon_url);
@@ -1217,7 +1218,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());
}
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_login_handler.cc ('k') | chrome/common/badge_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698