Commit e551da53 authored by John Lee's avatar John Lee Committed by Commit Bot

Navi: Replace 'Life' background with 'Earth' background

The 'Earth' background is the most popular background, based on requests
from the New Tab Page

Bug: 924176
Change-Id: Icf0b4192a19c289788199ee9b616bf8afb2a31b7
Reviewed-on: https://chromium-review.googlesource.com/c/1481991
Commit-Queue: John Lee <johntlee@chromium.org>
Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Reviewed-by: default avatarKyle Milka <kmilka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634726}
parent 50face7c
......@@ -67,8 +67,8 @@
<message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_CITYSCAPE_TITLE" desc="Label for choosing a background/wallpaper from the 'Cityscape' category">
Cityscape
</message>
<message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_LIFE_TITLE" desc="Label for choosing a background/wallpaper from the 'Life' category, as in a category of photos of nature, flowers, and buildings.">
Life
<message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_EARTH_TITLE" desc="Label for choosing a background/wallpaper from the 'Earth' category, as in a category of photos of planets and outer space.">
Earth
</message>
<message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_GEOMETRIC_SHAPES_TITLE" desc="Label for choosing a background/wallpaper from the 'Geometric Shapes' category">
Geometric shapes
......
......@@ -83,6 +83,10 @@
background-image: url(../images/ntp_thumbnails/cityscape.jpg);
}
.earth {
background-image: url(../images/ntp_thumbnails/earth.jpg);
}
.geometric-shapes {
background-image: url(../images/ntp_thumbnails/geometric_shapes.jpg);
}
......@@ -91,10 +95,6 @@
background-image: url(../images/ntp_thumbnails/landscape.jpg);
}
.life {
background-image: url(../images/ntp_thumbnails/life.jpg);
}
.ntp-background-title {
border-top: var(--cr-separator-line);
font-size: 14px;
......
......@@ -40,9 +40,9 @@
<include name="IDR_NUX_NTP_BACKGROUND_LOGO_2X" file="images\ntp_background_2x.png" type="BINDATA" />
<include name="IDR_NUX_NTP_BACKGROUND_THUMBNAIL_ART" file="images\ntp_thumbnails\art.jpg" type="BINDATA" />
<include name="IDR_NUX_NTP_BACKGROUND_THUMBNAIL_CITYSCAPE" file="images\ntp_thumbnails\cityscape.jpg" type="BINDATA" />
<include name="IDR_NUX_NTP_BACKGROUND_THUMBNAIL_EARTH" file="images\ntp_thumbnails\earth.jpg" type="BINDATA" />
<include name="IDR_NUX_NTP_BACKGROUND_THUMBNAIL_GEOMETRIC_SHAPES" file="images\ntp_thumbnails\geometric_shapes.jpg" type="BINDATA" />
<include name="IDR_NUX_NTP_BACKGROUND_THUMBNAIL_LANDSCAPE" file="images\ntp_thumbnails\landscape.jpg" type="BINDATA" />
<include name="IDR_NUX_NTP_BACKGROUND_THUMBNAIL_LIFE" file="images\ntp_thumbnails\life.jpg" type="BINDATA" />
<include name="IDR_NUX_SET_AS_DEFAULT_ILLUSTRATION_1X" file="images\set_as_default_illustration_1x.png" type="BINDATA" />
<include name="IDR_NUX_SET_AS_DEFAULT_ILLUSTRATION_2X" file="images\set_as_default_illustration_2x.png" type="BINDATA" />
<include name="IDR_NUX_SET_AS_DEFAULT_LOGO_1X" file="images\set_as_default_1x.png" type="BINDATA" />
......
......@@ -27,6 +27,12 @@ std::array<GURL, kOnboardingNtpBackgroundsCount> GetOnboardingNtpBackgrounds() {
"_S57gvzBw859pj5Xl2pW_GpfG8k2GhE9LUFNKwA=w3840-h2160-p-k-no-nd-"
"mv"),
// Earth
GURL("https://lh5.googleusercontent.com/proxy/"
"xvtq6_782kBajCBr0GISHpujOb51XLKUeEOJ2lLPKh12-"
"xNBTCtsoHT14NQcaH9l4JhatcXEMBkqgUeCWhb3XhdLnD1BiNzQ_LVydwg="
"w3840-h2160-p-k-no-nd-mv"),
// Geometric Shapes
GURL("https://lh3.googleusercontent.com/proxy/"
"FWOBAVfQYasxV3KURX1VVKem1yOC2iazWAb8csOmqCDwI1CCzAA1zCpnAxR-"
......@@ -38,12 +44,6 @@ std::array<GURL, kOnboardingNtpBackgroundsCount> GetOnboardingNtpBackgrounds() {
"nMIspgHzTUU0GzmiadmPphBelzF2xy9-tIiejZg3VvJTITxUb-1vILxf-"
"IsCfyl94VSn6YvHa8_PiIyR9d3rwD8ZhNdQ1C1rnblP6zy3OaI=w3840-h2160-"
"p-k-no-nd-mv"),
// Life
GURL("https://lh3.googleusercontent.com/proxy/"
"6gLbz6fLpHWeNGMCg-3SAr4V3qJsZN_Q-VePkM70-"
"FbHVROkRKx35pwEenRDVLuRSnQse6MTKo455BPVwULXX42R7VjAKJbm-4ivxQ="
"w3840-h2160-p-k-no-nd-mv"),
}};
return kOnboardingNtpBackgrounds;
}
......@@ -25,9 +25,9 @@ namespace nux {
enum class NtpBackgrounds {
kArt = 0,
kCityscape = 1,
kGeometricShapes = 2,
kLandscape = 3,
kLife = 4,
kEarth = 2,
kGeometricShapes = 3,
kLandscape = 4,
};
NtpBackgroundHandler::NtpBackgroundHandler() {}
......@@ -56,7 +56,17 @@ void NtpBackgroundHandler::HandleGetBackgrounds(const base::ListValue* args) {
GetOnboardingNtpBackgrounds();
auto element = std::make_unique<base::DictionaryValue>();
int id = static_cast<int>(NtpBackgrounds::kCityscape);
int id = static_cast<int>(NtpBackgrounds::kEarth);
element->SetInteger("id", id);
element->SetString("title",
l10n_util::GetStringUTF8(
IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_EARTH_TITLE));
element->SetString("imageUrl", onboardingNtpBackgrounds[id].spec());
element->SetString("thumbnailClass", "earth");
list_value.Append(std::move(element));
element = std::make_unique<base::DictionaryValue>();
id = static_cast<int>(NtpBackgrounds::kCityscape);
element->SetInteger("id", id);
element->SetString(
"title", l10n_util::GetStringUTF8(
......@@ -96,16 +106,6 @@ void NtpBackgroundHandler::HandleGetBackgrounds(const base::ListValue* args) {
element->SetString("thumbnailClass", "geometric-shapes");
list_value.Append(std::move(element));
element = std::make_unique<base::DictionaryValue>();
id = static_cast<int>(NtpBackgrounds::kLife);
element->SetInteger("id", id);
element->SetString("title",
l10n_util::GetStringUTF8(
IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_LIFE_TITLE));
element->SetString("imageUrl", onboardingNtpBackgrounds[id].spec());
element->SetString("thumbnailClass", "life");
list_value.Append(std::move(element));
ResolveJavascriptCallback(*callback_id, list_value);
}
......@@ -136,6 +136,14 @@ void NtpBackgroundHandler::HandleSetBackground(const base::ListValue* args) {
GURL("https://500px.com/photo/135751035/"
"soulseek-by-%E5%B0%A4%E9%87%91%E5%B0%BC-ev-tchebotarev"));
break;
case static_cast<int>(NtpBackgrounds::kEarth):
instant_service->SetCustomBackgroundURLWithAttributions(
onboardingNtpBackgrounds[backgroundIndex],
l10n_util::GetStringFUTF8(
IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_PHOTO_BY_LABEL,
base::UTF8ToUTF16("NASA Image Library")),
"", GURL("https://www.google.com/sky/"));
break;
case static_cast<int>(NtpBackgrounds::kGeometricShapes):
instant_service->SetCustomBackgroundURLWithAttributions(
onboardingNtpBackgrounds[backgroundIndex], "Tessellation 15",
......@@ -152,16 +160,6 @@ void NtpBackgroundHandler::HandleSetBackground(const base::ListValue* args) {
GURL("https://500px.com/photo/41149196/"
"le-piscine-sunset-by-giulio-rosso-chioso"));
break;
case static_cast<int>(NtpBackgrounds::kLife):
instant_service->SetCustomBackgroundURLWithAttributions(
onboardingNtpBackgrounds[backgroundIndex],
l10n_util::GetStringFUTF8(
IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_PHOTO_BY_LABEL,
base::UTF8ToUTF16("Toa Heftiba on Unsplash")),
"",
GURL("https://unsplash.com/collections/1813652/"
"google-pixel-in-bloom-collection"));
break;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment