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

Unified Diff: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp

Issue 2311233002: Warn about Web Audio without user gesture on Android no longer allowed on cross origin iframes. (Closed)
Patch Set: apply foolip comment Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
index 2e72ec0778d2f4d10bedb4b47c8f0f8f00d29de2..2d1e489aa55875d48d66576e229779f104f79649 100644
--- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
@@ -33,6 +33,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContextTask.h"
+#include "core/frame/Deprecation.h"
#include "core/frame/Settings.h"
#include "core/html/HTMLMediaElement.h"
#include "modules/mediastream/MediaStream.h"
@@ -553,8 +554,15 @@ void BaseAudioContext::recordUserGestureState()
userGestureHistogram.count(UserGestureNotRequiredAndNotAvailable);
return;
}
+
+ DCHECK(m_userGestureRequired);
if (!UserGestureIndicator::processingUserGesture()) {
userGestureHistogram.count(UserGestureRequiredAndNotAvailable);
+
+ Document* document = toDocument(getExecutionContext());
+ if (document)
+ Deprecation::countDeprecationCrossOriginIframe(*document, UseCounter::WebAudioAutoplayCrossOriginIframe);
+
return;
}
userGestureHistogram.count(UserGestureRequiredAndAvailable);
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698