Chromium Code Reviews| Index: ash/desktop_background/desktop_background_resources.cc |
| diff --git a/ash/desktop_background/desktop_background_resources.cc b/ash/desktop_background/desktop_background_resources.cc |
| index c6f8b35deecc9cbe86b880aa2ca4448038ab69f8..335be4fed956a358708642abd8fa0e2d6c676b76 100644 |
| --- a/ash/desktop_background/desktop_background_resources.cc |
| +++ b/ash/desktop_background/desktop_background_resources.cc |
| @@ -223,6 +223,12 @@ const ash::WallpaperInfo kDefaultWallpapers[] = { |
| }; |
| const int kDefaultWallpaperCount = arraysize(kDefaultWallpapers); |
| +const int kInvalidWallpaperIndex = -1; |
| +enum { |
|
sky
2012/04/20 22:39:16
Used named enums, but don't add the enum until you
|
| + RANDOM, |
| + CUSTOMIZED, |
| + DEFAULT |
| +}; |
| // TODO(saintlou): These hardcoded indexes, although checked against the size |
| // of the array are really hacky. |
| @@ -238,6 +244,10 @@ const int kGuestWallpaperIndex = kDefaultWallpaperIndex; |
| namespace ash { |
| +int GetInvalidWallpaperIndex() { |
| + return kInvalidWallpaperIndex; |
| +} |
| + |
| int GetDefaultWallpaperIndex() { |
| DCHECK(kDefaultWallpaperIndex < kDefaultWallpaperCount); |
| return std::min(kDefaultWallpaperIndex, kDefaultWallpaperCount - 1); |
| @@ -258,12 +268,6 @@ const SkBitmap& GetWallpaper(int index) { |
| kDefaultWallpapers[index].id).ToSkBitmap(); |
| } |
| -const SkBitmap& GetWallpaperThumbnail(int index) { |
| - DCHECK(index >= 0 && index < kDefaultWallpaperCount); |
| - return *ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| - kDefaultWallpapers[index].thumb_id).ToSkBitmap(); |
| -} |
| - |
| const WallpaperInfo& GetWallpaperInfo(int index) { |
| return kDefaultWallpapers[index]; |
| } |