Index: third_party/WebKit/Source/core/html/media/AutoplayUmaHelper.h |
diff --git a/third_party/WebKit/Source/core/html/media/AutoplayUmaHelper.h b/third_party/WebKit/Source/core/html/media/AutoplayUmaHelper.h |
index 55b5e1302270e1210168348b7bef0889598cea2a..ae92569d829b19357b230c9e9ba2813d9453663b 100644 |
--- a/third_party/WebKit/Source/core/html/media/AutoplayUmaHelper.h |
+++ b/third_party/WebKit/Source/core/html/media/AutoplayUmaHelper.h |
@@ -9,6 +9,7 @@ |
#include "core/dom/ContextLifecycleObserver.h" |
#include "core/events/EventListener.h" |
#include "platform/heap/Handle.h" |
+#include "public/platform/WebMediaPlayerClient.h" |
#include <set> |
@@ -87,6 +88,9 @@ class CORE_EXPORT AutoplayUmaHelper : public EventListener, |
private: |
friend class MockAutoplayUmaHelper; |
+ // Called when source is initialized and loading starts. |
+ void OnLoadStarted(); |
+ |
explicit AutoplayUmaHelper(HTMLMediaElement*); |
void handleEvent(ExecutionContext*, Event*) override; |
void HandlePlayingEvent(); |
@@ -113,7 +117,7 @@ class CORE_EXPORT AutoplayUmaHelper : public EventListener, |
// The autoplay sources. |
std::set<AutoplaySource> sources_; |
- // The media element this UMA helper is attached to. |m_element| owns |this|. |
+ // The media element this UMA helper is attached to. |element| owns |this|. |
Member<HTMLMediaElement> element_; |
// The observer is used to observe whether a muted video autoplaying by play() |
@@ -125,7 +129,7 @@ class CORE_EXPORT AutoplayUmaHelper : public EventListener, |
// ----------------------------------------------------------------------- |
// Variables used for recording the duration of autoplay muted video playing |
// offscreen. The variables are valid when |
- // |m_autoplayOffscrenVisibilityObserver| is non-null. |
+ // |autoplayOffscrenVisibilityObserver| is non-null. |
// The recording stops whenever the playback pauses or the page is unloaded. |
// The starting time of autoplaying muted video. |
@@ -144,6 +148,8 @@ class CORE_EXPORT AutoplayUmaHelper : public EventListener, |
// for recording as long as this observer is non-null. |
Member<ElementVisibilityObserver> |
muted_video_offscreen_duration_visibility_observer_; |
+ |
+ double load_start_time_ms_; |
}; |
} // namespace blink |