summaryrefslogtreecommitdiffstats
path: root/ash/desktop_background
diff options
context:
space:
mode:
authorbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 15:28:10 +0000
committerbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 15:28:10 +0000
commit50260954fa039c6e094964321f2e6fc961c00e48 (patch)
tree731c70e15f8a0ce3957683c317e801cf453cafe6 /ash/desktop_background
parent633e8cfa66bcd81847643bfeb895925fb03259be (diff)
downloadchromium_src-50260954fa039c6e094964321f2e6fc961c00e48.zip
chromium_src-50260954fa039c6e094964321f2e6fc961c00e48.tar.gz
chromium_src-50260954fa039c6e094964321f2e6fc961c00e48.tar.bz2
Display selected wallpaper attributions in the bottom bar of select wallpaper overlay
It also include a few UI tweaks for the overlay page. The mocks is available here: http://folder/kuscher/projects/Chrome_OS/Settings/wallpaper/wallpaperv4.png&f BUG=105508, 118708 TEST=Go to settings page, click on "Set Wallpaper.." button, select any image, verify if the image attributions (author and website) displayed in the bottom left area. Review URL: https://chromiumcodereview.appspot.com/9702102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/desktop_background')
-rw-r--r--ash/desktop_background/desktop_background_resources.cc141
-rw-r--r--ash/desktop_background/desktop_background_resources.h10
2 files changed, 79 insertions, 72 deletions
diff --git a/ash/desktop_background/desktop_background_resources.cc b/ash/desktop_background/desktop_background_resources.cc
index 9e2775b..3214b49 100644
--- a/ash/desktop_background/desktop_background_resources.cc
+++ b/ash/desktop_background/desktop_background_resources.cc
@@ -12,14 +12,7 @@
namespace {
-struct WallpaperInfo {
- int id;
- int thumb_id;
- const char* author;
- const char* url;
-};
-
-const WallpaperInfo kDefaultWallpapers[] = {
+const ash::WallpaperInfo kDefaultWallpapers[] = {
{
IDR_AURA_WALLPAPERS_ROMAINGUY_0,
IDR_AURA_WALLPAPERS_ROMAINGUY_0_THUMB,
@@ -30,380 +23,380 @@ const WallpaperInfo kDefaultWallpapers[] = {
IDR_AURA_WALLPAPERS_WALLPAPER_0,
IDR_AURA_WALLPAPERS_WALLPAPER_0_THUMB,
"Test Gradient 0",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_1,
IDR_AURA_WALLPAPERS_WALLPAPER_1_THUMB,
"Test Gradient 1",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_2,
IDR_AURA_WALLPAPERS_WALLPAPER_2_THUMB,
"Test Gradient 2",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_3,
IDR_AURA_WALLPAPERS_WALLPAPER_3_THUMB,
"Test Gradient 3",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_4,
IDR_AURA_WALLPAPERS_WALLPAPER_4_THUMB,
"Test Gradient 4",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_5,
IDR_AURA_WALLPAPERS_WALLPAPER_5_THUMB,
"Test Gradient 5",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_6,
IDR_AURA_WALLPAPERS_WALLPAPER_6_THUMB,
"Test Gradient 6",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_7,
IDR_AURA_WALLPAPERS_WALLPAPER_7_THUMB,
"Test Gradient 7",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_8,
IDR_AURA_WALLPAPERS_WALLPAPER_8_THUMB,
"Test Gradient 8",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_9,
IDR_AURA_WALLPAPERS_WALLPAPER_9_THUMB,
"Test Gradient 9",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_10,
IDR_AURA_WALLPAPERS_WALLPAPER_10_THUMB,
"Test Gradient 10",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_11,
IDR_AURA_WALLPAPERS_WALLPAPER_11_THUMB,
"Test Gradient 11",
- "http//www.chromium.org"
+ "http://www.chromium.org"
},
{
IDR_AURA_WALLPAPERS_WALLPAPER_12,
IDR_AURA_WALLPAPERS_WALLPAPER_12_THUMB,
- "Test Gradient 0",
- "http//www.chromium.org"
+ "Test Gradient 12",
+ "http://www.chromium.org"
},
#if defined(GOOGLE_CHROME_BUILD)
{
IDR_AURA_WALLPAPERS_CHARLESDAVEY_0,
IDR_AURA_WALLPAPERS_CHARLESDAVEY_0_THUMB,
"Charles Davey",
- "http//500px.com/CharlesDavey"
+ "http://500px.com/CharlesDavey"
},
{
IDR_AURA_WALLPAPERS_JOHANNESVANDONGE_0,
IDR_AURA_WALLPAPERS_JOHANNESVANDONGE_0_THUMB,
"Johannes van Donge",
- "http//www.diginature.nl"
+ "http://www.diginature.nl"
},
{
IDR_AURA_WALLPAPERS_JOHANNESVANDONGE_1,
IDR_AURA_WALLPAPERS_JOHANNESVANDONGE_1_THUMB,
"Johannes van Donge",
- "http//www.diginature.nl"
+ "http://www.diginature.nl"
},
{
IDR_AURA_WALLPAPERS_JOHANNESVANDONGE_2,
IDR_AURA_WALLPAPERS_JOHANNESVANDONGE_2_THUMB,
"Johannes van Donge",
- "http//www.diginature.nl"
+ "http://www.diginature.nl"
},
{
IDR_AURA_WALLPAPERS_MARIOMORENO_0,
IDR_AURA_WALLPAPERS_MARIOMORENO_0_THUMB,
"Mario Moreno",
- "http//www.mariomorenophotography.com"
+ "http://www.mariomorenophotography.com"
},
{
IDR_AURA_WALLPAPERS_MARIOMORENO_1,
IDR_AURA_WALLPAPERS_MARIOMORENO_1_THUMB,
"Mario Moreno",
- "http//www.mariomorenophotography.com"
+ "http://www.mariomorenophotography.com"
},
{
IDR_AURA_WALLPAPERS_MARIOMORENO_2,
IDR_AURA_WALLPAPERS_MARIOMORENO_2_THUMB,
"Mario Moreno",
- "http//www.mariomorenophotography.com"
+ "http://www.mariomorenophotography.com"
},
{
IDR_AURA_WALLPAPERS_MARIOMORENO_3,
IDR_AURA_WALLPAPERS_MARIOMORENO_3_THUMB,
"Mario Moreno",
- "http//www.mariomorenophotography.com"
+ "http://www.mariomorenophotography.com"
},
{
IDR_AURA_WALLPAPERS_MARIOMORENO_4,
IDR_AURA_WALLPAPERS_MARIOMORENO_4_THUMB,
"Mario Moreno",
- "http//www.mariomorenophotography.com"
+ "http://www.mariomorenophotography.com"
},
{
IDR_AURA_WALLPAPERS_MARIOMORENO_5,
IDR_AURA_WALLPAPERS_MARIOMORENO_5_THUMB,
"Mario Moreno",
- "http//www.mariomorenophotography.com"
+ "http://www.mariomorenophotography.com"
},
{
IDR_AURA_WALLPAPERS_MARIOMORENO_6,
IDR_AURA_WALLPAPERS_MARIOMORENO_6_THUMB,
"Mario Moreno",
- "http//www.mariomorenophotography.com"
+ "http://www.mariomorenophotography.com"
},
{
IDR_AURA_WALLPAPERS_MARIOMORENO_7,
IDR_AURA_WALLPAPERS_MARIOMORENO_7_THUMB,
"Mario Moreno",
- "http//www.mariomorenophotography.com"
+ "http://www.mariomorenophotography.com"
},
{
IDR_AURA_WALLPAPERS_MARIOMORENO_8,
IDR_AURA_WALLPAPERS_MARIOMORENO_8_THUMB,
"Mario Moreno",
- "http//www.mariomorenophotography.com"
+ "http://www.mariomorenophotography.com"
},
{
IDR_AURA_WALLPAPERS_MARKBRIDGER_0,
IDR_AURA_WALLPAPERS_MARKBRIDGER_0_THUMB,
"Mark Bridger",
- "http//www.bridgephotography.co.uk"
+ "http://www.bridgephotography.co.uk"
},
{
IDR_AURA_WALLPAPERS_MARKBRIDGER_1,
IDR_AURA_WALLPAPERS_MARKBRIDGER_1_THUMB,
"Mark Bridger",
- "http//www.bridgephotography.co.uk"
+ "http://www.bridgephotography.co.uk"
},
{
IDR_AURA_WALLPAPERS_MARKBRIDGER_2,
IDR_AURA_WALLPAPERS_MARKBRIDGER_2_THUMB,
"Mark Bridger",
- "http//www.bridgephotography.co.uk"
+ "http://www.bridgephotography.co.uk"
},
{
IDR_AURA_WALLPAPERS_MARKBRIDGER_3,
IDR_AURA_WALLPAPERS_MARKBRIDGER_3_THUMB,
"Mark Bridger",
- "http//www.bridgephotography.co.uk"
+ "http://www.bridgephotography.co.uk"
},
{
IDR_AURA_WALLPAPERS_MARKBRIDGER_4,
IDR_AURA_WALLPAPERS_MARKBRIDGER_4_THUMB,
"Mark Bridger",
- "http//www.bridgephotography.co.uk"
+ "http://www.bridgephotography.co.uk"
},
{
IDR_AURA_WALLPAPERS_MARKBRIDGER_5,
IDR_AURA_WALLPAPERS_MARKBRIDGER_5_THUMB,
"Mark Bridger",
- "http//www.bridgephotography.co.uk"
+ "http://www.bridgephotography.co.uk"
},
{
IDR_AURA_WALLPAPERS_MARKBRIDGER_6,
IDR_AURA_WALLPAPERS_MARKBRIDGER_6_THUMB,
"Mark Bridger",
- "http//www.bridgephotography.co.uk"
+ "http://www.bridgephotography.co.uk"
},
{
IDR_AURA_WALLPAPERS_MICHELBRICTEUX_0,
IDR_AURA_WALLPAPERS_MICHELBRICTEUX_0_THUMB,
"Michel Bricteux",
- "http//500px.com/mbricteux"
+ "http://500px.com/mbricteux"
},
{
IDR_AURA_WALLPAPERS_MICHELBRICTEUX_1,
IDR_AURA_WALLPAPERS_MICHELBRICTEUX_1_THUMB,
"Michel Bricteux",
- "http//500px.com/mbricteux"
+ "http://500px.com/mbricteux"
},
{
IDR_AURA_WALLPAPERS_MICHELBRICTEUX_2,
IDR_AURA_WALLPAPERS_MICHELBRICTEUX_2_THUMB,
"Michel Bricteux",
- "http//500px.com/mbricteux"
+ "http://500px.com/mbricteux"
},
{
IDR_AURA_WALLPAPERS_MICHELBRICTEUX_3,
IDR_AURA_WALLPAPERS_MICHELBRICTEUX_3_THUMB,
"Michel Bricteux",
- "http//500px.com/mbricteux"
+ "http://500px.com/mbricteux"
},
{
IDR_AURA_WALLPAPERS_MIKEREYFMAN_0,
IDR_AURA_WALLPAPERS_MIKEREYFMAN_0_THUMB,
"Mike Reyfman",
- "http//mikereyfman.com"
+ "http://mikereyfman.com"
},
{
IDR_AURA_WALLPAPERS_MIKEREYFMAN_1,
IDR_AURA_WALLPAPERS_MIKEREYFMAN_1_THUMB,
"Mike Reyfman",
- "http//mikereyfman.com"
+ "http://mikereyfman.com"
},
{
IDR_AURA_WALLPAPERS_MIKEREYFMAN_2,
IDR_AURA_WALLPAPERS_MIKEREYFMAN_2_THUMB,
"Mike Reyfman",
- "http//mikereyfman.com"
+ "http://mikereyfman.com"
},
{
IDR_AURA_WALLPAPERS_MIKEREYFMAN_3,
IDR_AURA_WALLPAPERS_MIKEREYFMAN_3_THUMB,
"Mike Reyfman",
- "http//mikereyfman.com"
+ "http://mikereyfman.com"
},
{
IDR_AURA_WALLPAPERS_MIKEREYFMAN_4,
IDR_AURA_WALLPAPERS_MIKEREYFMAN_4_THUMB,
"Mike Reyfman",
- "http//mikereyfman.com"
+ "http://mikereyfman.com"
},
{
IDR_AURA_WALLPAPERS_MIKEREYFMAN_5,
IDR_AURA_WALLPAPERS_MIKEREYFMAN_5_THUMB,
"Mike Reyfman",
- "http//mikereyfman.com"
+ "http://mikereyfman.com"
},
{
IDR_AURA_WALLPAPERS_MIKEREYFMAN_6,
IDR_AURA_WALLPAPERS_MIKEREYFMAN_6_THUMB,
"Mike Reyfman",
- "http//mikereyfman.com"
+ "http://mikereyfman.com"
},
{
IDR_AURA_WALLPAPERS_NEILKREMER_0,
IDR_AURA_WALLPAPERS_NEILKREMER_0_THUMB,
"Neil Kremer",
- "http//lightshedimagery.smugmug.com"
+ "http://lightshedimagery.smugmug.com"
},
{
IDR_AURA_WALLPAPERS_NEILKREMER_1,
IDR_AURA_WALLPAPERS_NEILKREMER_1_THUMB,
"Neil Kremer",
- "http//lightshedimagery.smugmug.com"
+ "http://lightshedimagery.smugmug.com"
},
{
IDR_AURA_WALLPAPERS_NEILKREMER_2,
IDR_AURA_WALLPAPERS_NEILKREMER_2_THUMB,
"Neil Kremer",
- "http//lightshedimagery.smugmug.com"
+ "http://lightshedimagery.smugmug.com"
},
{
IDR_AURA_WALLPAPERS_OLEGZHUKOV_0,
IDR_AURA_WALLPAPERS_OLEGZHUKOV_0_THUMB,
"Oleg Zhukov",
- "http//500px.com/eosboy"
+ "http://500px.com/eosboy"
},
{
IDR_AURA_WALLPAPERS_OLEGZHUKOV_1,
IDR_AURA_WALLPAPERS_OLEGZHUKOV_1_THUMB,
"Oleg Zhukov",
- "http//500px.com/eosboy"
+ "http://500px.com/eosboy"
},
{
IDR_AURA_WALLPAPERS_PAULOFLOP_0,
IDR_AURA_WALLPAPERS_PAULOFLOP_0_THUMB,
"Paulo FLOP",
- "http//500px.com/FLOP"
+ "http://500px.com/FLOP"
},
{
IDR_AURA_WALLPAPERS_PAULOFLOP_1,
IDR_AURA_WALLPAPERS_PAULOFLOP_1_THUMB,
"Paulo FLOP",
- "http//500px.com/FLOP"
+ "http://500px.com/FLOP"
},
{
IDR_AURA_WALLPAPERS_PAULOFLOP_2,
IDR_AURA_WALLPAPERS_PAULOFLOP_2_THUMB,
"Paulo FLOP",
- "http//500px.com/FLOP"
+ "http://500px.com/FLOP"
},
{
IDR_AURA_WALLPAPERS_PAULOFLOP_3,
IDR_AURA_WALLPAPERS_PAULOFLOP_3_THUMB,
"Paulo FLOP",
- "http//500px.com/FLOP"
+ "http://500px.com/FLOP"
},
{
IDR_AURA_WALLPAPERS_PAULOFLOP_4,
IDR_AURA_WALLPAPERS_PAULOFLOP_4_THUMB,
"Paulo FLOP",
- "http//500px.com/FLOP"
+ "http://500px.com/FLOP"
},
{
IDR_AURA_WALLPAPERS_PAULOFLOP_5,
IDR_AURA_WALLPAPERS_PAULOFLOP_5_THUMB,
"Paulo FLOP",
- "http//500px.com/FLOP"
+ "http://500px.com/FLOP"
},
{
IDR_AURA_WALLPAPERS_STEFANORONCHI_0,
IDR_AURA_WALLPAPERS_STEFANORONCHI_0_THUMB,
"Stefano Ronchi",
- "http//www.stefanoronchi.com"
+ "http://www.stefanoronchi.com"
},
{
IDR_AURA_WALLPAPERS_STEFANORONCHI_1,
IDR_AURA_WALLPAPERS_STEFANORONCHI_1_THUMB,
"Stefano Ronchi",
- "http//www.stefanoronchi.com"
+ "http://www.stefanoronchi.com"
},
{
IDR_AURA_WALLPAPERS_STEFANORONCHI_2,
IDR_AURA_WALLPAPERS_STEFANORONCHI_2_THUMB,
"Stefano Ronchi",
- "http//www.stefanoronchi.com"
+ "http://www.stefanoronchi.com"
},
{
IDR_AURA_WALLPAPERS_STEFANORONCHI_3,
IDR_AURA_WALLPAPERS_STEFANORONCHI_3_THUMB,
"Stefano Ronchi",
- "http//www.stefanoronchi.com"
+ "http://www.stefanoronchi.com"
},
{
IDR_AURA_WALLPAPERS_VITALIPROKOPENKO_0,
IDR_AURA_WALLPAPERS_VITALIPROKOPENKO_0_THUMB,
"Vitali Prokopenko",
- "http//www.vitphoto.com"
+ "http://www.vitphoto.com"
},
{
IDR_AURA_WALLPAPERS_VITALIPROKOPENKO_1,
IDR_AURA_WALLPAPERS_VITALIPROKOPENKO_1_THUMB,
"Vitali Prokopenko",
- "http//www.vitphoto.com"
+ "http://www.vitphoto.com"
},
{
IDR_AURA_WALLPAPERS_VITALIPROKOPENKO_2,
IDR_AURA_WALLPAPERS_VITALIPROKOPENKO_2_THUMB,
"Vitali Prokopenko",
- "http//www.vitphoto.com"
+ "http://www.vitphoto.com"
},
{
IDR_AURA_WALLPAPERS_WALTERSOESTBERGEN_0,
IDR_AURA_WALLPAPERS_WALTERSOESTBERGEN_0_THUMB,
"Walter Soestbergen",
- "http//www.waltersoestbergen.nl"
+ "http://www.waltersoestbergen.nl"
},
#endif // GOOGLE_CHROME_BUILD
};
@@ -435,4 +428,8 @@ const SkBitmap& GetWallpaperThumbnail(int index) {
kDefaultWallpapers[index].thumb_id).ToSkBitmap();
}
+const WallpaperInfo& GetWallpaperInfo(int index) {
+ return kDefaultWallpapers[index];
+}
+
} // namespace ash
diff --git a/ash/desktop_background/desktop_background_resources.h b/ash/desktop_background/desktop_background_resources.h
index e25b4c1..cbea990 100644
--- a/ash/desktop_background/desktop_background_resources.h
+++ b/ash/desktop_background/desktop_background_resources.h
@@ -11,10 +11,20 @@ class SkBitmap;
namespace ash {
+struct ASH_EXPORT WallpaperInfo {
+ int id;
+ int thumb_id;
+ // TODO(bshe): author member should be encoded to UTF16. We need to use i18n
+ // string for this member after M19.
+ const char* author;
+ const char* website;
+};
+
ASH_EXPORT int GetDefaultWallpaperIndex();
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