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

Unified Diff: trunk/src/ash/system/chromeos/network/network_icon.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
« no previous file with comments | « trunk/src/ash/shell/window_watcher.cc ('k') | trunk/src/ash/wm/frame_painter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/system/chromeos/network/network_icon.cc
===================================================================
--- trunk/src/ash/system/chromeos/network/network_icon.cc (revision 224497)
+++ trunk/src/ash/system/chromeos/network/network_icon.cc (working copy)
@@ -196,12 +196,13 @@
: size_(size) {
}
- virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
- gfx::Size pixel_size = gfx::ToFlooredSize(gfx::ScaleSize(size_, scale));
+ virtual gfx::ImageSkiaRep GetImageForScale(
+ ui::ScaleFactor scale_factor) OVERRIDE {
+ gfx::Size pixel_size = gfx::ToFlooredSize(
+ gfx::ScaleSize(size_, ui::GetScaleFactorScale(scale_factor)));
SkBitmap empty_bitmap = GetEmptyBitmap(pixel_size);
- return gfx::ImageSkiaRep(empty_bitmap, scale);
+ return gfx::ImageSkiaRep(empty_bitmap, scale_factor);
}
-
private:
const gfx::Size size_;
@@ -219,8 +220,9 @@
// TODO(pkotwicz): Figure out what to do when a new image resolution becomes
// available.
- 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);
if (icon_rep.is_null())
return gfx::ImageSkiaRep();
gfx::Canvas canvas(icon_rep, false);
« no previous file with comments | « trunk/src/ash/shell/window_watcher.cc ('k') | trunk/src/ash/wm/frame_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698