| Index: third_party/WebKit/Source/core/html/HTMLMediaElement.h
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.h b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
|
| index 282b0fae379e98ae19c87e05ddba06d8669e3091..fd3a02cb8e6b89a5fd73ef90f6e6f64cd0d2b918 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
|
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
|
| @@ -493,6 +493,7 @@ private:
|
| EnumerationHistogram& showControlsHistogram() const;
|
|
|
| void recordAutoplaySourceMetric(int source);
|
| + void recordAutoplayVideoOffscreenMetric(double timeDeltaMS);
|
|
|
| void onVisibilityChangedForAutoplay(bool isVisible);
|
|
|
| @@ -612,6 +613,18 @@ private:
|
| GC_PLUGIN_IGNORE("http://crbug.com/404577")
|
| WeakMember<AudioSourceProviderClient> m_audioSourceNode;
|
|
|
| + // Variables used for recording the duration of autoplay muted video playing offscreen.
|
| + // The variables are valid when |m_autoplayOffscrenVisibilityObserver| is non-null. Whenever the playback pauses, the UMA is recorded, and |m_autoplayOffscreenVisibilityObserver| is set to null.
|
| + double m_mutedVideoAutoplayStartTimeMS;
|
| + double m_mutedVideoAutoplayOffscreenDurationMS;
|
| + bool m_isVisible;
|
| + bool m_isAutoplayFromAttribute;
|
| + Member<ElementVisibilityObserver> m_autoplayOffscreenVisibilityObserver;
|
| +
|
| + void maybeRecordMutedVideoAutoplayOffscreenDuration();
|
| +
|
| + void onVisibilityChangedForAutoplayOffscreen(bool isVisibile);
|
| +
|
| // AudioClientImpl wraps an AudioSourceProviderClient.
|
| // When the audio format is known, Chromium calls setFormat().
|
| class AudioClientImpl final : public GarbageCollectedFinalized<AudioClientImpl>, public WebAudioSourceProviderClient {
|
|
|