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

Unified Diff: chrome/browser/extensions/extension_install_prompt.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/extensions/extension_install_prompt.cc
diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc
index 309c28f6aec9c48d765073ad14aa8ff8a5b85f62..e4a08aa8368237b323ee54a31815319e3da7c956 100644
--- a/chrome/browser/extensions/extension_install_prompt.cc
+++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -122,9 +122,7 @@ const int kIconSize = 69;
// Returns pixel size under maximal scale factor for the icon whose device
// independent size is |size_in_dip|
int GetSizeForMaxScaleFactor(int size_in_dip) {
- float max_scale_factor_scale =
- ui::GetScaleFactorScale(ui::GetMaxScaleFactor());
- return static_cast<int>(size_in_dip * max_scale_factor_scale);
+ return static_cast<int>(size_in_dip * gfx::ImageSkia::GetMaxSupportedScale());
}
// Returns bitmap for the default icon with size equal to the default icon's
@@ -133,7 +131,8 @@ SkBitmap GetDefaultIconBitmapForMaxScaleFactor(bool is_app) {
const gfx::ImageSkia& image = is_app ?
extensions::IconsInfo::GetDefaultAppIcon() :
extensions::IconsInfo::GetDefaultExtensionIcon();
- return image.GetRepresentation(ui::GetMaxScaleFactor()).sk_bitmap();
+ return image.GetRepresentation(
+ gfx::ImageSkia::GetMaxSupportedScale()).sk_bitmap();
}
// If auto confirm is enabled then posts a task to proceed with or cancel the
« no previous file with comments | « chrome/browser/extensions/extension_icon_manager.cc ('k') | chrome/browser/extensions/extension_uninstall_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698