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

Side by Side Diff: ash/desktop_background/desktop_background_resources.cc

Issue 10207030: Asynchronously load wallpapers when user pod is selected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698