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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.h

Issue 2475643004: Monitor the intersection of video and viewport. (Closed)
Patch Set: Add ElementViewportRatioObserver. Created 4 years, 1 month 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
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 c927eeb9db8409a3900dd725e0749b70eb442480..9af76dc0e49d6019f5b7afe2ff227caef4cc6935 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -52,7 +52,7 @@ class AudioTrackList;
class AutoplayUmaHelper;
class ContentType;
class CueTimeline;
-class ElementVisibilityObserver;
+class ElementViewportRatioObserver;
class EnumerationHistogram;
class Event;
class ExceptionState;
@@ -534,7 +534,7 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
EnumerationHistogram& showControlsHistogram() const;
- void onVisibilityChangedForAutoplay(bool isVisible);
+ void onVideoViewportRatioChanged(bool isVisible);
miu 2016/11/09 22:02:08 Per comments in other file, this callback method s
xjz 2016/11/11 01:07:29 Done.
UnthrottledThreadTimer<HTMLMediaElement> m_loadTimer;
UnthrottledThreadTimer<HTMLMediaElement> m_progressEventTimer;
@@ -716,11 +716,11 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
Member<AutoplayExperimentHelper::Client> m_autoplayHelperClient;
Member<AutoplayExperimentHelper> m_autoplayHelper;
Member<AutoplayUmaHelper> m_autoplayUmaHelper;
+ bool m_shouldAutoplayWhenVisible = false;
WebRemotePlaybackClient* m_remotePlaybackClient;
- // class AutoplayVisibilityObserver;
- Member<ElementVisibilityObserver> m_autoplayVisibilityObserver;
+ Member<ElementViewportRatioObserver> m_videoViewportRatioObserver;
static URLRegistry* s_mediaStreamRegistry;
};

Powered by Google App Engine
This is Rietveld 408576698