Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update focal points for SI (Uplift to 1.7.x) #5360

Merged
merged 1 commit into from
Apr 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ NTPSponsoredImagesBridge::CreateWallpaper() {
if (!image_path || !logo_image_path)
return base::android::ScopedJavaLocalRef<jobject>();

auto focal_point_x = data.FindIntPath("focalPoint.x");
auto focal_point_y = data.FindIntPath("focalPoint.y");
auto focal_point_x = data.FindIntPath("wallpaperFocalPointX");
auto focal_point_y = data.FindIntPath("wallpaperFocalPointY");
auto* logo_destination_url = data.FindStringPath("logo.destinationUrl");

return Java_NTPSponsoredImagesBridge_createWallpaper(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ base::Value NTPSponsoredImagesData::GetValueAt(size_t index) {
wallpaper_image_urls()[index]);
data.SetStringKey("wallpaperImagePath",
backgrounds[index].image_file.AsUTF8Unsafe());
data.SetIntKey("wallpaperFocalPointX", backgrounds[index].focal_point.x());
data.SetIntKey("wallpaperFocalPointY", backgrounds[index].focal_point.y());
base::Value logo_data(base::Value::Type::DICTIONARY);
logo_data.SetStringKey("image", logo_image_url());
logo_data.SetStringKey("imagePath", logo_image_file.AsUTF8Unsafe());
Expand Down