| Index: third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
|
| diff --git a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
|
| index 7dda64bb56d55bc2b799c5290a8a9b9f2c420e88..5cf38a734959aa87aed1d3818944e299887a2068 100644
|
| --- a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
|
| +++ b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
|
| @@ -37,7 +37,6 @@ enum AutoplayBlockedReason {
|
| };
|
|
|
| class Document;
|
| -class ElementVisibilityObserver;
|
| class HTMLMediaElement;
|
|
|
| class AutoplayUmaHelper final : public EventListener {
|
| @@ -58,6 +57,8 @@ class AutoplayUmaHelper final : public EventListener {
|
|
|
| bool hasSource() const { return m_source != AutoplaySource::NumberOfSources; }
|
|
|
| + void visibilityMaybeChangedforMutedVideo(bool isVisible);
|
| +
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| private:
|
| @@ -77,9 +78,6 @@ class AutoplayUmaHelper final : public EventListener {
|
| void maybeStartRecordingMutedVideoOffscreenDuration();
|
| void maybeStopRecordingMutedVideoOffscreenDuration();
|
|
|
| - void onVisibilityChangedForMutedVideoOffscreenDuration(bool isVisibile);
|
| - void onVisibilityChangedForMutedVideoPlayMethodBecomeVisible(bool isVisible);
|
| -
|
| bool shouldListenToUnloadEvent() const;
|
|
|
| // The autoplay source. Use AutoplaySource::NumberOfSources for invalid
|
| @@ -88,10 +86,10 @@ class AutoplayUmaHelper final : public EventListener {
|
| // The media element this UMA helper is attached to. |m_element| owns |this|.
|
| Member<HTMLMediaElement> m_element;
|
|
|
| - // The observer is used to observe whether a muted video autoplaying by play()
|
| - // method become visible at some point.
|
| - // The UMA is pending for recording as long as this observer is non-null.
|
| - Member<ElementVisibilityObserver> m_mutedVideoPlayMethodVisibilityObserver;
|
| + // Indicates whether is observing the visibility of a muted video autoplayed
|
| + // from 'play()' method. The UMA is pending for recording as long as this is
|
| + // true.
|
| + bool m_isObservingMutedVideoPlayMethodBecomeVisible = false;
|
|
|
| // -----------------------------------------------------------------------
|
| // Variables used for recording the duration of autoplay muted video playing
|
| @@ -108,11 +106,10 @@ class AutoplayUmaHelper final : public EventListener {
|
| // Whether an autoplaying muted video is visible.
|
| bool m_isVisible;
|
|
|
| - // The observer is used to observer an autoplaying muted video changing it's
|
| - // visibility, which is used for offscreen duration UMA. The UMA is pending
|
| - // for recording as long as this observer is non-null.
|
| - Member<ElementVisibilityObserver>
|
| - m_mutedVideoOffscreenDurationVisibilityObserver;
|
| + // Indicates whether is observing the visibility of a muted autoplay video for
|
| + // offscreen duration UMA. The UMA is pending for recording as long as this
|
| + // is true.
|
| + bool m_isObservingVisibilityOfMutedVideoOffscreenDuration = false;
|
| };
|
|
|
| } // namespace blink
|
|
|