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

New Tab Page Branded Wallpapers (desktop) #4075

Merged
merged 59 commits into from
Jan 27, 2020
Merged

New Tab Page Branded Wallpapers (desktop) #4075

merged 59 commits into from
Jan 27, 2020

Commits on Jan 24, 2020

  1. Configuration menu
    Copy the full SHA
    2d693a8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2f3ca18 View commit details
    Browse the repository at this point in the history
  3. New Tab Page WebUI: grid is more modular, allows items to collapse an…

    …d branded credit to extend upwards in to free space in another row
    petemill committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    528ef67 View commit details
    Browse the repository at this point in the history
  4. New Tab Page: Backend and API for Branded Wallpaper, including correc…

    …t view counts and demo content
    petemill committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    0de449e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e6b4265 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    22bc549 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    473ac52 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9b1d676 View commit details
    Browse the repository at this point in the history
  9. New Tab Page WebUI: Widget menu becomes optional

    Branded Wallpaper Logo wants to use common widget styling but not have a menu. Functionality to turn that off is contained within the New Tab Page settings.
    petemill committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    4471768 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d408bb2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f289bc1 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7376699 View commit details
    Browse the repository at this point in the history
  13. New Tab Page: Put branded wallpaper features behind two brave://flags:

    1. Enable branded wallpapers
    2. Force dummy content for Branded Wallpaper
    petemill committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    3442c4f View commit details
    Browse the repository at this point in the history
  14. New Tab Page: Support multiple branded wallpaper images

    Images are displayed in sequence in the order specified in the data
    petemill committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    e5bf80a View commit details
    Browse the repository at this point in the history
  15. Implement backend service for ntp sponsored images

    NTPSponsoredImagesService registers proper components based on
    locale and will notify to its observers whenever components is updated.
    
    NTPSponsoredImageSource serves branded images.
    simonhong authored and petemill committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    f4c8432 View commit details
    Browse the repository at this point in the history
  16. Rename NTPSponsoredImagesService to NTPSponsoredImagesComponentManager

    Renamed because NTPSponsoredImagesService manages component registration
    and component update. and Service is normaly used by KeyedService.
    Also, Client should do some jobs per profile. It's adding and updating
    URLDataSources per profile whenever component is updated.
    NTPSponsoredImagesService(BrowserContextKeyedService)  will be added
    for that job.
    simonhong authored and petemill committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    436f74f View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2020

  1. Implement NTPSponsoredImagesService

    This service will add/update proper URLDataSource for serving
    branded images to webui.
    simonhong authored and petemill committed Jan 25, 2020
    Configuration menu
    Copy the full SHA
    580ea35 View commit details
    Browse the repository at this point in the history
  2. Implement NTPSponsoredImageSource::StartDataRequest()

    With this, chrome://branded-logo.png and chrome://branded-wallpaper-N.jpg
    are loaded.
    
    And separate ImagesData into exported data and internal data.
    exported data doesn't need to have file path for image resources.
    simonhong authored and petemill committed Jan 25, 2020
    Configuration menu
    Copy the full SHA
    9c1d5ff View commit details
    Browse the repository at this point in the history
  3. Fix lint error and comments

    simonhong authored and petemill committed Jan 25, 2020
    Configuration menu
    Copy the full SHA
    b522095 View commit details
    Browse the repository at this point in the history
  4. Add test for ntp component manager

    simonhong authored and petemill committed Jan 25, 2020
    Configuration menu
    Copy the full SHA
    a5d3ed6 View commit details
    Browse the repository at this point in the history
  5. Update method definition of overloaded operator=

    Normally, overloaded assign operator returns references of its object.
    Of course, using wrong return type doesn't have any differences because
    we deleted this.
    simonhong authored and petemill committed Jan 25, 2020
    Configuration menu
    Copy the full SHA
    5cac240 View commit details
    Browse the repository at this point in the history
  6. Use one URLDataSource for branded-wallpaper host

    Use brave://branded-wallpaper/logo.png or
    brave://branded-wallpaper/wallpaper-N.jpg
    simonhong authored and petemill committed Jan 25, 2020
    Configuration menu
    Copy the full SHA
    41d7574 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    46be4d4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4024f49 View commit details
    Browse the repository at this point in the history
  9. Export constants

    simonhong authored and petemill committed Jan 25, 2020
    Configuration menu
    Copy the full SHA
    3029302 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5b05c41 View commit details
    Browse the repository at this point in the history
  11. Don't build ntp_sponsored_images as a component

    Some of modules in this deps list doesn't build as a component.
    Because of this, they could be included in many places in component build.
    simonhong authored and petemill committed Jan 25, 2020
    Configuration menu
    Copy the full SHA
    f2b3da8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f50183c View commit details
    Browse the repository at this point in the history
  13. WebUI string helper to extract components of translated strings desti…

    …ned for HTML elements, such as links or bold text
    petemill committed Jan 25, 2020
    Configuration menu
    Copy the full SHA
    d244e46 View commit details
    Browse the repository at this point in the history
  14. New Tab Page WebUI: Allow Widgets to have widget functionality disabl…

    …ed. Useful for notifications.
    petemill committed Jan 25, 2020
    Configuration menu
    Copy the full SHA
    c7c2b2b View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2020

  1. New Tab Page WebUI: Rewards widget re-design and more Branded Wallpap…

    …er notification states
    petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    81c21ba View commit details
    Browse the repository at this point in the history
  2. Provide default move constructor to NTPSponsoredImagesData

    This move ctor needs for implicit converting to Optional().
    simonhong authored and petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    63c654b View commit details
    Browse the repository at this point in the history
  3. Fix unitest build failure

    simonhong authored and petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    64b2359 View commit details
    Browse the repository at this point in the history
  4. Relaxed no_deps rules of ntp_sponsored_images target

    brave_ads component has //chrome/android dependency.
    So changed no_deps rule from //chrome/* to //chrome/browser/*.
    simonhong authored and petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    25a3313 View commit details
    Browse the repository at this point in the history
  5. Disable no_deps in ntp_sponsored_images target

    brave_ads components eventually has //chrome/browser dependency.
    So, temporarilly disable no_deps.
    simonhong authored and petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    689cbc3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a6c6dab View commit details
    Browse the repository at this point in the history
  7. Modified photo.json parse logic

    simonhong authored and petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    6f49c34 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5ad6513 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c1722d9 View commit details
    Browse the repository at this point in the history
  10. New Tab Page WebUI: All widget scenarios allow for branded logo to si…

    …t next to any gaps in the left column
    petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    d3730f9 View commit details
    Browse the repository at this point in the history
  11. New Tab Page: Branded wallpaper notification show and dismiss logic b…

    …ased on a profile preference which is reset when Rewards or Ads is toggled on or off
    petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    4c10929 View commit details
    Browse the repository at this point in the history
  12. New Tab Page: Start NewTabPageBrandedViewCounter at profile init so t…

    …hat it can keep track of rewards and ads toggles in order to reset notification dismiss flag
    petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    4479a41 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    9607758 View commit details
    Browse the repository at this point in the history
  14. Deprecate BrandedWallpaper data structure

    Instead use NTPSponsoredImagesData
    simonhong authored and petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    7292ef2 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    5e8c044 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    c0f9f88 View commit details
    Browse the repository at this point in the history
  17. Correct current_wallpaper_image_index_ calculation

    So far, image index was 1 -> 2 -> 0 -> 1 -> 2 -> 0 with 3 images.
    It should be 0 -> 1 -> 2 -> 0 -> 1 -> 2 -> 0
    simonhong authored and petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    36fd337 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    9fea909 View commit details
    Browse the repository at this point in the history
  19. Delete deprecated DISALLOW_XXX

    simonhong authored and petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    789fccd View commit details
    Browse the repository at this point in the history
  20. Launch NewTabPageBrandedViewCounter only when it is needed

    We don't need to initiate NewTabPageBrandedViewCounter when
    branded ntp feature is disabled.
    simonhong authored and petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    42d6865 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    4ba3931 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    9ed5bf0 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    bc02497 View commit details
    Browse the repository at this point in the history
  24. Make NewTabPageBrandedViewCounter add URLDataSource

    NTPSponsoredImagesService was used only for adding URLDataSource.
    and we have another service for ntp sponsorship.
    So, unified to ViewCounter service.
    simonhong authored and petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    9dd4b60 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    aeab4ad View commit details
    Browse the repository at this point in the history
  26. Rename NTPSponsoredImagesComponentManager

    To NTPSponsoredImagesService because it doesn't manage component.
    And fixed lint errors and added missing deps.
    simonhong authored and petemill committed Jan 26, 2020
    Configuration menu
    Copy the full SHA
    bc8dda3 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    5cad9f5 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2020

  1. refactor to remove brave/browser and chrome/browser dependencies outs…

    …ide of ViewCounterServiceFactory
    bridiver authored and petemill committed Jan 27, 2020
    Configuration menu
    Copy the full SHA
    278fb27 View commit details
    Browse the repository at this point in the history
  2. fix hash size for component

    bridiver authored and petemill committed Jan 27, 2020
    Configuration menu
    Copy the full SHA
    2d86102 View commit details
    Browse the repository at this point in the history