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

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

Issue 10823213: Change default wallpaper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for 141222 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/wallpaper_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 ash::CENTER_CROPPED 289 ash::CENTER_CROPPED
290 }, 290 },
291 { 291 {
292 IDR_AURA_WALLPAPERS_3_URBAN3_SMALL, 292 IDR_AURA_WALLPAPERS_3_URBAN3_SMALL,
293 ash::CENTER 293 ash::CENTER
294 }, 294 },
295 IDR_AURA_WALLPAPERS_3_URBAN3_THUMB, 295 IDR_AURA_WALLPAPERS_3_URBAN3_THUMB,
296 "Neil Kremer", 296 "Neil Kremer",
297 "http://lightshedimagery.smugmug.com" 297 "http://lightshedimagery.smugmug.com"
298 }, 298 },
299 {
300 {
301 IDR_AURA_WALLPAPERS_2_LANDSCAPE8_LARGE,
302 ash::CENTER_CROPPED
303 },
304 {
305 IDR_AURA_WALLPAPERS_2_LANDSCAPE8_SMALL,
306 ash::CENTER
307 },
308 IDR_AURA_WALLPAPERS_2_LANDSCAPE8_THUMB,
309 "Clemens Günthermann",
310 "http://www.clegue.com"
311 },
299 #endif 312 #endif
300 { 313 {
301 { 314 {
302 IDR_AURA_WALLPAPERS_5_GRADIENT0_LARGE,
303 ash::TILE
304 },
305 {
306 IDR_AURA_WALLPAPERS_5_GRADIENT0_SMALL,
307 ash::TILE
308 },
309 IDR_AURA_WALLPAPERS_5_GRADIENT0_THUMB,
310 "Chromium",
311 "http://www.chromium.org"
312 },
313 {
314 {
315 IDR_AURA_WALLPAPERS_5_GRADIENT1_LARGE, 315 IDR_AURA_WALLPAPERS_5_GRADIENT1_LARGE,
316 ash::TILE 316 ash::TILE
317 }, 317 },
318 { 318 {
319 IDR_AURA_WALLPAPERS_5_GRADIENT1_SMALL, 319 IDR_AURA_WALLPAPERS_5_GRADIENT1_SMALL,
320 ash::TILE 320 ash::TILE
321 }, 321 },
322 IDR_AURA_WALLPAPERS_5_GRADIENT1_THUMB, 322 IDR_AURA_WALLPAPERS_5_GRADIENT1_THUMB,
323 "Chromium", 323 "Chromium",
324 "http://www.chromium.org" 324 "http://www.chromium.org"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 }; 404 };
405 405
406 const int kWallpaperLayoutCount = arraysize(kWallpaperLayoutArrays); 406 const int kWallpaperLayoutCount = arraysize(kWallpaperLayoutArrays);
407 const int kDefaultWallpaperCount = arraysize(kDefaultWallpapers); 407 const int kDefaultWallpaperCount = arraysize(kDefaultWallpapers);
408 const int kInvalidWallpaperIndex = -1; 408 const int kInvalidWallpaperIndex = -1;
409 const int kSolidColorIndex = -2; 409 const int kSolidColorIndex = -2;
410 410
411 // TODO(saintlou): These hardcoded indexes, although checked against the size 411 // TODO(saintlou): These hardcoded indexes, although checked against the size
412 // of the array are really hacky. 412 // of the array are really hacky.
413 #if defined(GOOGLE_CHROME_BUILD) 413 #if defined(GOOGLE_CHROME_BUILD)
414 const int kDefaultWallpaperIndex = 16; // IDR_AURA_WALLPAPERS_3_URBAN0 414 const int kDefaultWallpaperIndex = 20; // IDR_AURA_WALLPAPERS_2_LANDSCAPE8
415 const int kLastRandomWallpaperIndex = 19; // The first 20 are random. 415 const int kLastRandomWallpaperIndex = 19; // The first 20 are random.
416 const int kGuestWallpaperIndex = 26; // IDR_AURA_WALLPAPERS_5_GRADIENT6 416 const int kGuestWallpaperIndex = kDefaultWallpaperIndex;
417 #else 417 #else
418 // Set default wallpaper to the grey background for faster wallpaper loading 418 // Set default wallpaper to the grey background for faster wallpaper loading
419 // time in browser tests. Otherwise, some of the tests will finish before 419 // time in browser tests. Otherwise, some of the tests will finish before
420 // wallpaper loaded and cause crashes. 420 // wallpaper loaded and cause crashes.
421 const int kDefaultWallpaperIndex = 6; // IDR_AURA_WALLPAPERS_5_GRADIENT5 421 const int kDefaultWallpaperIndex = 5; // IDR_AURA_WALLPAPERS_5_GRADIENT5
422 const int kLastRandomWallpaperIndex = 8; 422 const int kLastRandomWallpaperIndex = 8;
423 const int kGuestWallpaperIndex = kDefaultWallpaperIndex; 423 const int kGuestWallpaperIndex = kDefaultWallpaperIndex;
424 #endif 424 #endif
425 425
426 } // namespace 426 } // namespace
427 427
428 namespace ash { 428 namespace ash {
429 429
430 int GetDefaultWallpaperIndex() { 430 int GetDefaultWallpaperIndex() {
431 DCHECK(kDefaultWallpaperIndex < kDefaultWallpaperCount); 431 DCHECK(kDefaultWallpaperIndex < kDefaultWallpaperCount);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 470
471 const WallpaperViewInfo& GetWallpaperViewInfo(int index, 471 const WallpaperViewInfo& GetWallpaperViewInfo(int index,
472 WallpaperResolution resolution) { 472 WallpaperResolution resolution) {
473 if (resolution == SMALL) 473 if (resolution == SMALL)
474 return kDefaultWallpapers[index].small_wallpaper; 474 return kDefaultWallpapers[index].small_wallpaper;
475 else 475 else
476 return kDefaultWallpapers[index].large_wallpaper; 476 return kDefaultWallpapers[index].large_wallpaper;
477 } 477 }
478 478
479 } // namespace ash 479 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/wallpaper_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698