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

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

Issue 2511143006: Detect change on the intersection of video and viewport. (Closed)
Patch Set: Addressed ojan's comments. 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 0bd98bca6d30fa8ac49f065ddad4b715583cedbb..7da86b28e3943632cbe0414c2104821b3d282f64 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -544,10 +544,14 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
void onVisibilityChangedForAutoplay(bool isVisible);
+ void checkViewportIntersectionChanged();
+ void viewportFillDebouncerTimerFired(TimerBase*);
+
UnthrottledThreadTimer<HTMLMediaElement> m_loadTimer;
UnthrottledThreadTimer<HTMLMediaElement> m_progressEventTimer;
UnthrottledThreadTimer<HTMLMediaElement> m_playbackProgressTimer;
UnthrottledThreadTimer<HTMLMediaElement> m_audioTracksTimer;
+ UnthrottledThreadTimer<HTMLMediaElement> m_viewportFillDebouncerTimer;
Member<TimeRanges> m_playedTimeRanges;
Member<GenericEventQueue> m_asyncEventQueue;
@@ -647,6 +651,8 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
// Whether this element is in overlay fullscreen mode.
bool m_inOverlayFullscreenVideo : 1;
+ bool m_mostlyFillingViewport : 1;
+
TraceWrapperMember<AudioTrackList> m_audioTracks;
TraceWrapperMember<VideoTrackList> m_videoTracks;
TraceWrapperMember<TextTrackList> m_textTracks;
@@ -731,6 +737,8 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
// class AutoplayVisibilityObserver;
Member<ElementVisibilityObserver> m_autoplayVisibilityObserver;
+ IntRect m_currentIntersectRect;
+
static URLRegistry* s_mediaStreamRegistry;
};

Powered by Google App Engine
This is Rietveld 408576698