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 2505616af94ea7ca993426a45f40c022475b1f5b..72d6c1d066549d9349c4c8f913fde74ca1bdc3d7 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h |
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h |
@@ -30,6 +30,7 @@ |
#include "bindings/core/v8/ScriptPromise.h" |
#include "core/CoreExport.h" |
#include "core/dom/ActiveDOMObject.h" |
+#include "core/dom/ElementVisibilityObserver.h" |
#include "core/dom/ExceptionCode.h" |
#include "core/events/GenericEventQueue.h" |
#include "core/html/AutoplayExperimentHelper.h" |
@@ -70,7 +71,7 @@ class WebInbandTextTrack; |
class WebLayer; |
class WebRemotePlaybackClient; |
-class CORE_EXPORT HTMLMediaElement : public HTMLElement, public Supplementable<HTMLMediaElement>, public ActiveScriptWrappable, public ActiveDOMObject, private WebMediaPlayerClient { |
+class CORE_EXPORT HTMLMediaElement : public HTMLElement, public Supplementable<HTMLMediaElement>, public ActiveScriptWrappable, public ActiveDOMObject, private WebMediaPlayerClient, private ElementVisibilityObserver::Client { |
DEFINE_WRAPPERTYPEINFO(); |
USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElement); |
USING_PRE_FINALIZER(HTMLMediaElement, dispose); |
@@ -502,7 +503,9 @@ private: |
void recordAutoplaySourceMetric(int source); |
void recordAutoplayUnmuteStatus(AutoplayUnmuteActionStatus); |
- void onVisibilityChangedForAutoplay(bool isVisible); |
+ // ElementVisibilityObserver::Client implementation |
+ void onVisibilityChanged(bool isVisible) override; |
+ ExecutionContext* getElementVisibilityExecutionContext() const override { return getExecutionContext(); } |
UnthrottledTimer<HTMLMediaElement> m_loadTimer; |
UnthrottledTimer<HTMLMediaElement> m_progressEventTimer; |