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

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

Issue 2463113002: Let AutoplayUmaHelper listen to visibilitychange instead of unload (Closed)
Patch Set: 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/AutoplayUmaHelper.h
diff --git a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
index 7dda64bb56d55bc2b799c5290a8a9b9f2c420e88..a331dade004db7e4f514fdc484c28f1c46492381 100644
--- a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
+++ b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
@@ -67,9 +67,9 @@ class AutoplayUmaHelper final : public EventListener {
void handlePlayingEvent();
void handlePauseEvent();
- void handleUnloadEvent();
+ void handlePageVisibilityChangeEvent();
- void maybeUnregisterUnloadListener();
+ void maybeUnregisterPageVisibilityChangeListener();
void maybeStartRecordingMutedVideoPlayMethodBecomeVisible();
void maybeStopRecordingMutedVideoPlayMethodBecomeVisible(bool isVisible);
@@ -80,7 +80,7 @@ class AutoplayUmaHelper final : public EventListener {
void onVisibilityChangedForMutedVideoOffscreenDuration(bool isVisibile);
void onVisibilityChangedForMutedVideoPlayMethodBecomeVisible(bool isVisible);
- bool shouldListenToUnloadEvent() const;
+ bool shouldListenToPageVisibilityChangeEvent() const;
// The autoplay source. Use AutoplaySource::NumberOfSources for invalid
// source.

Powered by Google App Engine
This is Rietveld 408576698