diff options
Diffstat (limited to 'ash/desktop_background')
-rw-r--r-- | ash/desktop_background/desktop_background_resources.cc | 11 | ||||
-rw-r--r-- | ash/desktop_background/desktop_background_resources.h | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/ash/desktop_background/desktop_background_resources.cc b/ash/desktop_background/desktop_background_resources.cc index c6f8b35..f53ac63 100644 --- a/ash/desktop_background/desktop_background_resources.cc +++ b/ash/desktop_background/desktop_background_resources.cc @@ -223,6 +223,7 @@ const ash::WallpaperInfo kDefaultWallpapers[] = { }; const int kDefaultWallpaperCount = arraysize(kDefaultWallpapers); +const int kInvalidWallpaperIndex = -1; // TODO(saintlou): These hardcoded indexes, although checked against the size // of the array are really hacky. @@ -238,6 +239,10 @@ const int kGuestWallpaperIndex = kDefaultWallpaperIndex; namespace ash { +int GetInvalidWallpaperIndex() { + return kInvalidWallpaperIndex; +} + int GetDefaultWallpaperIndex() { DCHECK(kDefaultWallpaperIndex < kDefaultWallpaperCount); return std::min(kDefaultWallpaperIndex, kDefaultWallpaperCount - 1); @@ -258,12 +263,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]; } diff --git a/ash/desktop_background/desktop_background_resources.h b/ash/desktop_background/desktop_background_resources.h index 0fde38e..3812f51 100644 --- a/ash/desktop_background/desktop_background_resources.h +++ b/ash/desktop_background/desktop_background_resources.h @@ -28,11 +28,11 @@ struct ASH_EXPORT WallpaperInfo { const char* website; }; +ASH_EXPORT int GetInvalidWallpaperIndex(); ASH_EXPORT int GetDefaultWallpaperIndex(); ASH_EXPORT int GetGuestWallpaperIndex(); ASH_EXPORT int GetWallpaperCount(); ASH_EXPORT const SkBitmap& GetWallpaper(int index); -ASH_EXPORT const SkBitmap& GetWallpaperThumbnail(int index); ASH_EXPORT const WallpaperInfo& GetWallpaperInfo(int index); } // namespace ash |