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

Unified Diff: ash/desktop_background/desktop_background_view.cc

Issue 11415015: Remove use of index in wallpaper picker code and some refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser tests Created 8 years, 1 month 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 | « ash/desktop_background/desktop_background_view.h ('k') | ash/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/desktop_background/desktop_background_view.cc
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc
index 99b22dd896be120801e466f86ef17524fc450c6c..86175a43e57b23e493a016b1ca0237e998b58632 100644
--- a/ash/desktop_background/desktop_background_view.cc
+++ b/ash/desktop_background/desktop_background_view.cc
@@ -128,8 +128,8 @@ void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) {
WallpaperLayout wallpaper_layout = controller->GetWallpaperLayout();
gfx::Rect wallpaper_rect(0, 0, wallpaper.width(), wallpaper.height());
- if (wallpaper_layout == ash::CENTER_CROPPED && wallpaper.width() > width()
- && wallpaper.height() > height()) {
+ if (wallpaper_layout == WALLPAPER_LAYOUT_CENTER_CROPPED &&
+ wallpaper.width() > width() && wallpaper.height() > height()) {
// The dimension with the smallest ratio must be cropped, the other one
// is preserved. Both are set in gfx::Size cropped_size.
double horizontal_ratio = static_cast<double>(width()) /
@@ -154,9 +154,9 @@ void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) {
wallpaper_cropped_rect.width(), wallpaper_cropped_rect.height(),
0, 0, width(), height(),
true);
- } else if (wallpaper_layout == ash::TILE) {
+ } else if (wallpaper_layout == WALLPAPER_LAYOUT_TILE) {
canvas->TileImageInt(wallpaper, 0, 0, width(), height());
- } else if (wallpaper_layout == ash::STRETCH) {
+ } else if (wallpaper_layout == WALLPAPER_LAYOUT_STRETCH) {
// This is generally not recommended as it may show artifacts.
canvas->DrawImageInt(wallpaper, 0, 0, wallpaper.width(),
wallpaper.height(), 0, 0, width(), height(), true);
« no previous file with comments | « ash/desktop_background/desktop_background_view.h ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698