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

Unified Diff: trunk/src/chrome/browser/thumbnails/simple_thumbnail_crop.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/thumbnails/simple_thumbnail_crop.cc
===================================================================
--- trunk/src/chrome/browser/thumbnails/simple_thumbnail_crop.cc (revision 224498)
+++ trunk/src/chrome/browser/thumbnails/simple_thumbnail_crop.cc (working copy)
@@ -8,7 +8,6 @@
#include "content/public/browser/browser_thread.h"
#include "skia/ext/platform_canvas.h"
#include "ui/gfx/color_utils.h"
-#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/scrollbar_size.h"
#include "ui/gfx/size_conversions.h"
@@ -122,7 +121,7 @@
switch (scale_factor) {
case ui::SCALE_FACTOR_100P:
copy_size = gfx::ToFlooredSize(gfx::ScaleSize(
- copy_size, ui::GetImageScale(ui::SCALE_FACTOR_200P)));
+ copy_size, ui::GetScaleFactorScale(ui::SCALE_FACTOR_200P)));
break;
case ui::SCALE_FACTOR_200P:
// Use the size as-is.
@@ -131,7 +130,7 @@
DLOG(WARNING) << "Unsupported scale factor. Use the same copy size as "
<< "ui::SCALE_FACTOR_100P";
copy_size = gfx::ToFlooredSize(gfx::ScaleSize(
- copy_size, gfx::ImageSkia::GetMaxSupportedScale()));
+ copy_size, ui::GetMaxScaleFactor()));
break;
}
return copy_size;
@@ -184,7 +183,8 @@
const gfx::Size& given_size) {
// TODO(mazda|oshima): Update thumbnail when the max scale factor changes.
// crbug.com/159157.
- float max_scale_factor = gfx::ImageSkia::GetMaxSupportedScale();
+ float max_scale_factor =
+ ui::GetScaleFactorScale(ui::GetMaxScaleFactor());
return gfx::ToFlooredSize(gfx::ScaleSize(given_size, max_scale_factor));
}

Powered by Google App Engine
This is Rietveld 408576698