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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.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/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 06d4a93b6dfca9cb3d42b26427ecb7be2d3f6673..d3a325529e2f86dfbd5043a8dc4e73155edd1360 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -2048,6 +2048,7 @@ Nullable<ExceptionCode> HTMLMediaElement::play()
return NotAllowedError;
}
} else {
+ UserGestureIndicator::utilizeUserGesture();
// We ask the helper to remove the gesture requirement for us, so that
// it can record the reason.
Platform::current()->recordAction(UserMetricsAction("Media_Play_WithGesture"));
@@ -2107,7 +2108,7 @@ void HTMLMediaElement::pause()
// Only buffer aggressively on a user-initiated pause. Other types of pauses
// (which go directly to pauseInternal()) should not cause this behavior.
- if (webMediaPlayer() && UserGestureIndicator::processingUserGesture())
+ if (webMediaPlayer() && UserGestureIndicator::utilizeUserGesture())
webMediaPlayer()->setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Aggressive);
pauseInternal();
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormElement.cpp ('k') | third_party/WebKit/Source/core/html/forms/ColorInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698