Push API: Don't require notification if tab is visible.
For developers who have opted in to showing a user-visible UI change on every push (in exchange for showing the user a less scary permission prompt), we currently[1] enforce that each push shows a notification.
This patch relaxes the requirement slightly, so that sites don't need to show user-visible UI if a same-origin-ish[2] tab is currently visible, i.e. is the active tab of a non-minimized window. That's because updating the UI of such a tab instead of showing a notification is a valid way to show user-visible UI.
See also:
- https://crbug.com/437277
- http://lists.w3.org/Archives/Public/public-webapps/2014OctDec/0214.html
- https://github.com/w3c/push-api/pull/87
[1]: (since https://codereview.chromium.org/
842233003)
[2]: (see comment in push_messaging_service_impl.cc)
BUG=437277
Review URL: https://codereview.chromium.org/
866443003
Cr-Commit-Position: refs/heads/master@{#314586}