Chromium Code Reviews| 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..34e43f03d9bf6b5d358de9fdc8bfa65653e6c4b8 100644 |
| --- a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h |
| +++ b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h |
| @@ -58,6 +58,8 @@ class AutoplayUmaHelper final : public EventListener { |
| bool hasSource() const { return m_source != AutoplaySource::NumberOfSources; } |
| + void visibilityMaybeChangedforMutedVideo(bool isVisible); |
| + |
| DECLARE_VIRTUAL_TRACE(); |
| private: |
| @@ -77,9 +79,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 +87,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_isObservingVisibilityOfMutedAutoplayVideo = false; |
|
Zhiqiang Zhang (Slow)
2016/11/15 11:29:27
nit: Currently, this is describing more than what
xjz
2016/11/15 23:03:39
Done.
|
| // ----------------------------------------------------------------------- |
| // Variables used for recording the duration of autoplay muted video playing |
| @@ -108,11 +107,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 |