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

Unified Diff: ash/system/chromeos/network/network_icon.cc

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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: ash/system/chromeos/network/network_icon.cc
diff --git a/ash/system/chromeos/network/network_icon.cc b/ash/system/chromeos/network/network_icon.cc
index 7cb009ae6fa7c3baa64dd16594e82574f3ff6e06..7e64bbeca0eb79e9081b54a5300b7d18374fff4e 100644
--- a/ash/system/chromeos/network/network_icon.cc
+++ b/ash/system/chromeos/network/network_icon.cc
@@ -196,13 +196,12 @@ class EmptyImageSource: public gfx::ImageSkiaSource {
: size_(size) {
}
- virtual gfx::ImageSkiaRep GetImageForScale(
- ui::ScaleFactor scale_factor) OVERRIDE {
- gfx::Size pixel_size = gfx::ToFlooredSize(
- gfx::ScaleSize(size_, ui::GetScaleFactorScale(scale_factor)));
+ virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ gfx::Size pixel_size = gfx::ToFlooredSize(gfx::ScaleSize(size_, scale));
SkBitmap empty_bitmap = GetEmptyBitmap(pixel_size);
- return gfx::ImageSkiaRep(empty_bitmap, scale_factor);
+ return gfx::ImageSkiaRep(empty_bitmap, scale);
}
+
private:
const gfx::Size size_;
@@ -220,9 +219,8 @@ class NetworkIconImageSource : public gfx::ImageSkiaSource {
// TODO(pkotwicz): Figure out what to do when a new image resolution becomes
// available.
- virtual gfx::ImageSkiaRep GetImageForScale(
- ui::ScaleFactor scale_factor) OVERRIDE {
- gfx::ImageSkiaRep icon_rep = icon_.GetRepresentation(scale_factor);
+ virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE {
+ gfx::ImageSkiaRep icon_rep = icon_.GetRepresentation(scale);
if (icon_rep.is_null())
return gfx::ImageSkiaRep();
gfx::Canvas canvas(icon_rep, false);
« no previous file with comments | « ash/shell/window_watcher.cc ('k') | ash/wm/frame_painter.cc » ('j') | cc/layers/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698