Ensure Safety Tips only open when tab is visible.

This CL prevents the Safety Tip bubble or infobar from activating when a
page is loaded in the background by adding a visibility check before
displaying and checking safety tip status when a tab becomes newly
visible. This results in potentially checking the reputation of a page
multiple times, but doing so is inexpensive at present. If future checks
are heavier, we may need to cache reputation results.

This CL also changes behavior of the escape key, which is now treated as
equivalent to other ways to close the bubble.

Bug: 994410
Change-Id: I27c4bb6839afb6e9e5188665aa89cd30437c75cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761221
Commit-Queue: Joe DeBlasio <[email protected]>
Reviewed-by: Emily Stark <[email protected]>
Cr-Commit-Position: refs/heads/master@{#689301}
5 files changed