| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/desktop_background/desktop_background_resources.h" | 5 #include "ash/desktop_background/desktop_background_resources.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
| 9 #include "grit/ui_resources.h" | 9 #include "grit/ui_resources.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 | 250 |
| 251 int GetGuestWallpaperIndex() { | 251 int GetGuestWallpaperIndex() { |
| 252 DCHECK(kGuestWallpaperIndex < kDefaultWallpaperCount); | 252 DCHECK(kGuestWallpaperIndex < kDefaultWallpaperCount); |
| 253 return std::min(kGuestWallpaperIndex, kDefaultWallpaperCount - 1); | 253 return std::min(kGuestWallpaperIndex, kDefaultWallpaperCount - 1); |
| 254 } | 254 } |
| 255 | 255 |
| 256 int GetWallpaperCount() { | 256 int GetWallpaperCount() { |
| 257 return kDefaultWallpaperCount; | 257 return kDefaultWallpaperCount; |
| 258 } | 258 } |
| 259 | 259 |
| 260 const SkBitmap& GetWallpaper(int index) { | 260 const WallpaperInfo& GetWallpaperInfo(int index) { |
| 261 DCHECK(index >= 0 && index < kDefaultWallpaperCount); | 261 DCHECK(index >= 0 && index < kDefaultWallpaperCount); |
| 262 return *ui::ResourceBundle::GetSharedInstance().GetImageNamed( | |
| 263 kDefaultWallpapers[index].id).ToSkBitmap(); | |
| 264 } | |
| 265 | |
| 266 const WallpaperInfo& GetWallpaperInfo(int index) { | |
| 267 return kDefaultWallpapers[index]; | 262 return kDefaultWallpapers[index]; |
| 268 } | 263 } |
| 269 | 264 |
| 270 } // namespace ash | 265 } // namespace ash |
| OLD | NEW |