Media Controls: record display and interaction will buttons and sliders for CTR.

Desktop / Chromium - Mounir Lamouri [chromium.org] - 14 July 2017 08:06 EDT

Adding the necessary scaffolding to compute the CTR of media controls elements with as much precision as possible. This is not computing CTR using visibility to the user but hypothetical visibility on the page in the sense that the element was displayed in the controls but maybe never scrolled into view.

In order for an element to be marked as displayed, the element has to have metadata downloaded or be set to not preload by the page or the browser.

This CL also removes the CTR code for the download button and the cast overlay button given that this code is more precise and more generic.

Bug: 651644 Change-Id: I86c2bc4d1a19ab99a211082d8b3546b79ea71144 Reviewed-on: https://chromium-review.googlesource.com/567194 Commit-Queue: Mounir Lamouri

aeb364f Media Controls: record display and interaction will buttons and sliders for CTR.
.../WebKit/Source/core/html/HTMLMediaElement.h | 1 +
third_party/WebKit/Source/modules/BUILD.gn | 1 +
.../modules/media_controls/MediaControlsImpl.cpp | 10 +
.../media_controls/MediaControlsImplTest.cpp | 60 -----
.../elements/MediaControlCastButtonElement.cpp | 28 +--
.../elements/MediaControlCastButtonElement.h | 29 +--
.../elements/MediaControlDivElement.cpp | 6 +
.../elements/MediaControlDivElement.h | 1 +
.../elements/MediaControlDownloadButtonElement.cpp | 30 +--
.../elements/MediaControlDownloadButtonElement.h | 17 +-
.../elements/MediaControlElementBase.h | 19 +-
.../MediaControlFullscreenButtonElement.cpp | 4 +
.../elements/MediaControlFullscreenButtonElement.h | 3 +
.../elements/MediaControlInputElement.cpp | 73 ++++++
.../elements/MediaControlInputElement.h | 39 ++-
.../elements/MediaControlInputElementTest.cpp | 280 +++++++++++++++++++++
.../elements/MediaControlMuteButtonElement.cpp | 4 +
.../elements/MediaControlMuteButtonElement.h | 3 +
.../MediaControlOverflowMenuButtonElement.cpp | 5 +
.../MediaControlOverflowMenuButtonElement.h | 3 +
.../MediaControlOverlayPlayButtonElement.cpp | 4 +
.../MediaControlOverlayPlayButtonElement.h | 3 +
.../elements/MediaControlPlayButtonElement.cpp | 4 +
.../elements/MediaControlPlayButtonElement.h | 3 +
.../elements/MediaControlTimelineElement.cpp | 9 +
.../elements/MediaControlTimelineElement.h | 3 +
...diaControlToggleClosedCaptionsButtonElement.cpp | 6 +
...MediaControlToggleClosedCaptionsButtonElement.h | 3 +
.../elements/MediaControlVolumeSliderElement.cpp | 9 +
.../elements/MediaControlVolumeSliderElement.h | 3 +
tools/metrics/histograms/enums.xml | 5 +
tools/metrics/histograms/histograms.xml | 48 ++++
32 files changed, 567 insertions(+), 149 deletions(-)

Upstream: git.chromium.org


  • Share