Popup metrics: Log engagement time related to tab-unders

This patch logs the time a particular WebContents spends in the
foreground, after a navigation which:
 - Is started in the background
 - Commits to a cross-origin site
 - Has no user gesture
 - Is not the first navigation in the WebContents

This metric will serve as a basis for determining how much user
benefit comes from the (imo) harmful practice of navigating a site
without user action or direct consent.

In the near future, this metric will be broken up to also include
breakouts for if the WebContents opened a popup before performing
this kind of navigation.

Bug: 661629
Change-Id: Ib6b59792b193bd447fd59939e06ed94d25c1be6b
Reviewed-on: https://chromium-review.googlesource.com/685559
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505248}
7 files changed