| 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..682cb160599eca24f9c9bc77096ec3e50b89bae1 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;
|
| @@ -309,6 +309,8 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
|
| }
|
| void setRemotePlaybackClient(WebRemotePlaybackClient*);
|
|
|
| + float videoViewportRatio() const { return m_viewportRatio; }
|
| +
|
| protected:
|
| HTMLMediaElement(const QualifiedName&, Document&);
|
| ~HTMLMediaElement() override;
|
| @@ -534,7 +536,7 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
|
|
|
| EnumerationHistogram& showControlsHistogram() const;
|
|
|
| - void onVisibilityChangedForAutoplay(bool isVisible);
|
| + void onVideoViewportRatioChanged(float ratio);
|
|
|
| UnthrottledThreadTimer<HTMLMediaElement> m_loadTimer;
|
| UnthrottledThreadTimer<HTMLMediaElement> m_progressEventTimer;
|
| @@ -658,6 +660,8 @@ class CORE_EXPORT HTMLMediaElement : public HTMLElement,
|
| GC_PLUGIN_IGNORE("http://crbug.com/404577")
|
| WeakMember<AudioSourceProviderClient> m_audioSourceNode;
|
|
|
| + float m_viewportRatio = 0;
|
| +
|
| // AudioClientImpl wraps an AudioSourceProviderClient.
|
| // When the audio format is known, Chromium calls setFormat().
|
| class AudioClientImpl final
|
| @@ -716,11 +720,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;
|
| };
|
|
|