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

Unified Diff: trunk/src/chrome/browser/extensions/extension_uninstall_dialog.cc

Issue 24262008: Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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: trunk/src/chrome/browser/extensions/extension_uninstall_dialog.cc
===================================================================
--- trunk/src/chrome/browser/extensions/extension_uninstall_dialog.cc (revision 224497)
+++ trunk/src/chrome/browser/extensions/extension_uninstall_dialog.cc (working copy)
@@ -21,14 +21,14 @@
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
-#include "ui/gfx/image/image_skia.h"
namespace {
// 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 = gfx::ImageSkia::GetMaxSupportedScale();
+ ui::ScaleFactor max_scale_factor = ui::GetMaxScaleFactor();
+ float max_scale_factor_scale = ui::GetScaleFactorScale(max_scale_factor);
return static_cast<int>(size_in_dip * max_scale_factor_scale);
}
@@ -39,8 +39,7 @@
const gfx::ImageSkia& image = is_app ?
extensions::IconsInfo::GetDefaultAppIcon() :
extensions::IconsInfo::GetDefaultExtensionIcon();
- return image.GetRepresentation(
- gfx::ImageSkia::GetMaxSupportedScale()).sk_bitmap();
+ return image.GetRepresentation(ui::GetMaxScaleFactor()).sk_bitmap();
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698