Commit 27f2fbb2 authored by oysteine@chromium.org's avatar oysteine@chromium.org

Added new entry to the Blink.MediaElement.Autoplay histogram to account for...

Added new entry to the Blink.MediaElement.Autoplay histogram to account for cases where autoplay is reenabled on a Media element by a user-gesture triggered script

R=qinmin,adamk
BUG=432734

Review URL: https://codereview.chromium.org/719413002

git-svn-id: svn://svn.chromium.org/blink/trunk@185332 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 0d74405d
...@@ -276,6 +276,8 @@ enum AutoplayMetrics { ...@@ -276,6 +276,8 @@ enum AutoplayMetrics {
AutoplayBailout = 2, AutoplayBailout = 2,
// Autoplay disabled but user manually started media. // Autoplay disabled but user manually started media.
AutoplayManualStart = 3, AutoplayManualStart = 3,
// Autoplay was (re)enabled through a user-gesture triggered load()
AutoplayEnabledThroughLoad = 4,
// This enum value must be last. // This enum value must be last.
NumberOfAutoplayMetrics, NumberOfAutoplayMetrics,
}; };
...@@ -740,8 +742,10 @@ void HTMLMediaElement::load() ...@@ -740,8 +742,10 @@ void HTMLMediaElement::load()
{ {
WTF_LOG(Media, "HTMLMediaElement::load(%p)", this); WTF_LOG(Media, "HTMLMediaElement::load(%p)", this);
if (UserGestureIndicator::processingUserGesture()) if (UserGestureIndicator::processingUserGesture()) {
recordAutoplayMetric(AutoplayEnabledThroughLoad);
m_userGestureRequiredForPlay = false; m_userGestureRequiredForPlay = false;
}
prepareForLoad(); prepareForLoad();
loadInternal(); loadInternal();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment