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

Unified Diff: ash/desktop_background/desktop_background_controller.cc

Issue 10883062: Resize and save custom wallpaper to large and small size (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk Created 8 years, 4 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/desktop_background/desktop_background_controller.cc
diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc
index 83b486c4808ea4692a786d0f352ccc178be46ea8..0bd8b3542efdffc1fbf6f4ec800ef6d77c570ab8 100644
--- a/ash/desktop_background/desktop_background_controller.cc
+++ b/ash/desktop_background/desktop_background_controller.cc
@@ -26,8 +26,6 @@
namespace ash {
namespace {
-const int kSmallWallpaperMaximalWidth = 1366;
-const int kSmallWallpaperMaximalHeight = 800;
const SkColor kTransparentColor = SkColorSetARGB(0x00, 0x00, 0x00, 0x00);
internal::RootWindowLayoutManager* GetRootWindowLayoutManager(
@@ -37,6 +35,11 @@ internal::RootWindowLayoutManager* GetRootWindowLayoutManager(
}
} // namespace
+const int kSmallWallpaperMaxWidth = 1366;
+const int kSmallWallpaperMaxHeight = 800;
+const int kLargeWallpaperMaxWidth = 2560;
+const int kLargeWallpaperMaxHeight = 1700;
+
// Stores the current wallpaper data.
struct DesktopBackgroundController::WallpaperData {
WallpaperData(int index, WallpaperResolution resolution)
@@ -228,8 +231,8 @@ WallpaperResolution DesktopBackgroundController::GetAppropriateResolution() {
for (Shell::RootWindowList::iterator iter = root_windows.begin();
iter != root_windows.end(); ++iter) {
gfx::Size root_window_size = (*iter)->GetHostSize();
- if (root_window_size.width() > kSmallWallpaperMaximalWidth ||
- root_window_size.height() > kSmallWallpaperMaximalHeight)
+ if (root_window_size.width() > kSmallWallpaperMaxWidth ||
+ root_window_size.height() > kSmallWallpaperMaxHeight)
resolution = LARGE;
}
return resolution;

Powered by Google App Engine
This is Rietveld 408576698