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

Unified Diff: Source/core/html/AutoplayExperimentConfig.cpp

Issue 1329853004: Include viewport visibility checks for autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@autoplay_step1
Patch Set: Created 5 years, 3 months 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: Source/core/html/AutoplayExperimentConfig.cpp
diff --git a/Source/core/html/AutoplayExperimentConfig.cpp b/Source/core/html/AutoplayExperimentConfig.cpp
index 8af7d9fb1b9c8b70131707e39e787cd88ef52db9..9485194f624e62584f039d64bd48a7d3c2c70041 100644
--- a/Source/core/html/AutoplayExperimentConfig.cpp
+++ b/Source/core/html/AutoplayExperimentConfig.cpp
@@ -16,6 +16,8 @@ AutoplayExperimentConfig::Mode AutoplayExperimentConfig::fromString(const String
value |= AutoplayExperimentConfig::Mode::ForVideo;
if (mode.contains("-foraudio"))
value |= AutoplayExperimentConfig::Mode::ForAudio;
+ if (mode.contains("-ifviewport"))
+ value |= AutoplayExperimentConfig::Mode::IfViewport;
if (mode.contains("-ifmuted"))
value |= AutoplayExperimentConfig::Mode::IfMuted;
if (mode.contains("-ifmobile"))

Powered by Google App Engine
This is Rietveld 408576698