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

Unified Diff: trunk/src/chrome/browser/extensions/extension_action.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_action.cc
===================================================================
--- trunk/src/chrome/browser/extensions/extension_action.cc (revision 224497)
+++ trunk/src/chrome/browser/extensions/extension_action.cc (working copy)
@@ -39,12 +39,13 @@
: icon_(icon) {}
// gfx::ImageSkiaSource overrides:
- virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
- gfx::ImageSkiaRep icon_rep = icon_.GetRepresentation(scale);
+ virtual gfx::ImageSkiaRep GetImageForScale(ui::ScaleFactor scale_factor)
+ OVERRIDE {
+ gfx::ImageSkiaRep icon_rep = icon_.GetRepresentation(scale_factor);
color_utils::HSL shift = {-1, 0, 0.5};
return gfx::ImageSkiaRep(
SkBitmapOperations::CreateHSLShiftedBitmap(icon_rep.sk_bitmap(), shift),
- icon_rep.scale());
+ icon_rep.scale_factor());
}
private:
@@ -67,7 +68,7 @@
private:
virtual ~AnimatedIconImageSource() {}
- virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ virtual gfx::ImageSkiaRep GetImageForScale(ui::ScaleFactor scale) OVERRIDE {
gfx::ImageSkiaRep original_rep = image_.GetRepresentation(scale);
if (!animation_.get())
return original_rep;
@@ -76,7 +77,8 @@
// factor passed to this method. We want to use the former (since we are
// using bitmap for that scale).
return gfx::ImageSkiaRep(
- animation_->Apply(original_rep.sk_bitmap()), original_rep.scale());
+ animation_->Apply(original_rep.sk_bitmap()),
+ original_rep.scale_factor());
}
gfx::ImageSkia image_;

Powered by Google App Engine
This is Rietveld 408576698