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

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

Issue 2563723002: [Autoplay] Add more rappor metrics for autoplay in cross-origin iframes (Closed)
Patch Set: rebased Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
diff --git a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
index aafa273d334da41fd19acad85f93c779e6dacb64..88bd8dfe08d0d87140ec435ec2262cddd0d0efcc 100644
--- a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
+++ b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
@@ -86,6 +86,7 @@ class CORE_EXPORT AutoplayUmaHelper : public EventListener,
virtual void handleContextDestroyed(); // Make virtual for testing.
void maybeUnregisterContextDestroyedObserver();
+ void maybeUnregisterMediaElementPauseListener();
void maybeStartRecordingMutedVideoPlayMethodBecomeVisible();
void maybeStopRecordingMutedVideoPlayMethodBecomeVisible(bool isVisible);
@@ -93,10 +94,13 @@ class CORE_EXPORT AutoplayUmaHelper : public EventListener,
void maybeStartRecordingMutedVideoOffscreenDuration();
void maybeStopRecordingMutedVideoOffscreenDuration();
+ void maybeRecordUserPausedAutoplayingCrossOriginVideo();
+
void onVisibilityChangedForMutedVideoOffscreenDuration(bool isVisibile);
void onVisibilityChangedForMutedVideoPlayMethodBecomeVisible(bool isVisible);
bool shouldListenToContextDestroyed() const;
+ bool shouldRecordUserPausedAutoplayingCrossOriginVideo() const;
// The autoplay source. Use AutoplaySource::NumberOfSources for invalid
// source.
@@ -126,6 +130,9 @@ class CORE_EXPORT AutoplayUmaHelper : public EventListener,
std::set<CrossOriginAutoplayResult> m_recordedCrossOriginAutoplayResults;
+ // Whether the UMA helper has recorded user pausing a cross-origin video.
+ bool m_hasRecordedUserPausedAutoplayingCrossOriginVideo;
+
// The observer is used to observer an autoplaying muted video changing it's
// visibility, which is used for offscreen duration UMA. The UMA is pending
// for recording as long as this observer is non-null.
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698