Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp

Issue 1799253002: Stricter user gestures for touch - measure and warn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweaks Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
diff --git a/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp b/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
index 4fc3f313b399e8816502e37f3f6b185583a1104d..92f9d5af4b30000717932f3028f73257d423a49d 100644
--- a/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
+++ b/third_party/WebKit/Source/core/html/AutoplayExperimentHelper.cpp
@@ -83,7 +83,7 @@ void AutoplayExperimentHelper::playMethodCalled()
// Having this set is okay.
m_playPending = true;
- if (!UserGestureIndicator::processingUserGesture()) {
+ if (!UserGestureIndicator::utilizeUserGesture()) {
autoplayMediaEncountered();
if (isEligible()) {
@@ -121,7 +121,7 @@ void AutoplayExperimentHelper::pauseMethodCalled()
void AutoplayExperimentHelper::loadMethodCalled()
{
- if (UserGestureIndicator::processingUserGesture() && isUserGestureRequiredForPlay()) {
+ if (isUserGestureRequiredForPlay() && UserGestureIndicator::utilizeUserGesture()) {
recordAutoplayMetric(AutoplayEnabledThroughLoad);
removeUserGestureRequirement(GesturelessPlaybackEnabledByLoad);
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698