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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h

Issue 2046933003: WebAudio: record whether user gesture was available and provided. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 | « no previous file | third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h
index df197dd959e968e96fa73b291b3417d46461d356..da683742690fdafc1899ee34087ad234c41e963f 100644
--- a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h
+++ b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h
@@ -260,6 +260,12 @@ public:
// Get the PeriodicWave for the specified oscillator type. The table is initialized internally
// if necessary.
PeriodicWave* periodicWave(int type);
+
+ // Check whether the AudioContext requires a user gesture and whether the
+ // current stack is processing user gesture and record these information in
+ // a histogram.
+ void recordUserGestureState();
+
protected:
explicit AbstractAudioContext(Document*);
AbstractAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate);
@@ -337,6 +343,9 @@ private:
// excessive number of times.
bool m_isResolvingResumePromises;
+ // Whether a user gesture is required to start this AudioContext.
+ bool m_userGestureRequired;
+
unsigned m_connectionCount;
// Graph locking.
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698