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

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

Issue 293563002: GetScaleFactorForNativeView should return scale factor in float (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 03740a98c7de42d92c7855a5684832baa847776b..098bbb1d58a839f21599ae0889427b88fe69bc87 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -314,10 +314,10 @@ bool HasPolicyForNetwork(const NetworkState* network,
void SetCommonNetworkInfo(const ManagedState* state,
const gfx::ImageSkia& icon,
- ui::ScaleFactor icon_scale_factor,
+ float icon_scale_factor,
base::DictionaryValue* network_info) {
gfx::ImageSkiaRep image_rep =
- icon.GetRepresentation(ui::GetImageScale(icon_scale_factor));
+ icon.GetRepresentation(icon_scale_factor);
std::string icon_url =
icon.isNull() ? "" : webui::GetBitmapDataUrl(image_rep.sk_bitmap());
network_info->SetString(kNetworkInfoKeyIconURL, icon_url);
@@ -337,7 +337,7 @@ void SetCommonNetworkInfo(const ManagedState* state,
// transferred to the caller.
base::DictionaryValue* BuildNetworkDictionary(
const NetworkState* network,
- ui::ScaleFactor icon_scale_factor,
+ float icon_scale_factor,
const PrefService* profile_prefs) {
scoped_ptr<base::DictionaryValue> network_info(new base::DictionaryValue());
network_info->SetBoolean(kNetworkInfoKeyConnectable, network->connectable());
@@ -356,7 +356,7 @@ base::DictionaryValue* BuildNetworkDictionary(
base::DictionaryValue* BuildFavoriteDictionary(
const FavoriteState* favorite,
- ui::ScaleFactor icon_scale_factor,
+ float icon_scale_factor,
const PrefService* profile_prefs) {
scoped_ptr<base::DictionaryValue> network_info(new base::DictionaryValue());
network_info->SetBoolean(kNetworkInfoKeyConnectable, false);
@@ -1262,7 +1262,7 @@ std::string InternetOptionsHandler::GetIconDataUrl(int resource_id) const {
gfx::ImageSkia* icon =
ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resource_id);
gfx::ImageSkiaRep image_rep = icon->GetRepresentation(
- ui::GetImageScale(web_ui()->GetDeviceScaleFactor()));
+ web_ui()->GetDeviceScaleFactor());
return webui::GetBitmapDataUrl(image_rep.sk_bitmap());
}

Powered by Google App Engine
This is Rietveld 408576698