New Tab Page WebUI: Use Profile Preferences to store page options instead of localStorage #2830
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is created as a PR on top of #2762 since it has not been merged yet. That PR contains all the extra settings. If we want to merge this refactor before that PR then we can remove the extra preferences from this PR and keep only the preference for background image.
This allows:
Use FireWebUIListener to push data to javascript event subscribers.
Still uses render_view_host->SetWebUIProperty (like the existing NTP data), which we may port in the future to a DataSource Dictionary like the other WebUI in chromium.
Provides any data retrieved or updated to redux store via redux action, but does not use redux actions to ask for a data change.
Also includes
Refactor NTP WebUI backend
Focus on the MessageHandler in order to use FireWebUIListener and follow chromium best practice for setting data and events
TS types for NTP actions
Small change for intellisense™ and action parameter type checking
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.