[webui][ntp] Support custom style of third-party theme background images
Third-party themes can configure the styling (e.g. tiling, placement) of their background images. To support that, this CL adds a new chrome-untrusted://new-tab-page/custom_background_image helper that behaves similar to chrome-untrusted://new-tab-page/background_image but allows for custom styling. The custom styles can be passed via URL query params. Internally, this new helper uses the same HTML as background_image. However, background_image sets the styles to the values we have used previously for first-party background images. The styling properties are passed to the NTP JS via mojo. And the JS forwards the styling to the custom_background_image helper. That way first- and third-party themes share as much code as possible. Bug: 1081441 Change-Id: I943806aa9ab61c402217f8658ce548a9b85a435f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2202502 Auto-Submit: Tibor Goldschwendt <tiborg@chromium.org> Commit-Queue: Alex Gough <ajgo@chromium.org> Reviewed-by:Esmael Elmoslimany <aee@chromium.org> Reviewed-by:
Alex Gough <ajgo@chromium.org> Cr-Commit-Position: refs/heads/master@{#769052}
Showing
Please register or sign in to comment