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

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 8d18de4075f6a6fff5cb3c3ddcfacb9404d8bb49..6ad5001ec6aade95b5ed9c045dbe9a01788c830c 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -312,10 +312,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);
@@ -335,7 +335,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());
@@ -354,7 +354,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);
@@ -1260,7 +1260,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());
}
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_dropdown.cc ('k') | chrome/browser/ui/webui/sync_setup_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698