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

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

Issue 1370723002: Include viewport visibility checks for autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased. Created 5 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/AutoplayExperimentConfig.h
diff --git a/third_party/WebKit/Source/core/html/AutoplayExperimentConfig.h b/third_party/WebKit/Source/core/html/AutoplayExperimentConfig.h
deleted file mode 100644
index e1dd6daa4ca8ae2d216aa7a2eb938f05be704f31..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/html/AutoplayExperimentConfig.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef AutoplayExperimentConfig_h
-#define AutoplayExperimentConfig_h
-
-namespace WTF {
-class String;
-}
-
-namespace blink {
-
-class AutoplayExperimentConfig {
- public:
- // Experiment configuration bits. These maybe combined. For example,
- // ForVideo|IfMuted will override the user gesture requirement for
- // playing video that has no audio or is muted. ForVideo, by itself,
- // will entirely override the user gesture requirement for all video
- // elements, but not for audio elements.
- enum Mode {
- // Do not enable the autoplay experiment.
- Off = 0,
- // Enable gestureless autoplay for video elements.
- ForVideo = 1 << 0,
- // Enable gestureless autoplay for audio elements.
- ForAudio = 1 << 1,
- // Restrict gestureless autoplay to audio-less or muted media.
- IfMuted = 1 << 2,
- // Restrict gestureless autoplay to sites which contain the
- // viewport tag.
- IfMobile = 1 << 3,
- // If gestureless autoplay is allowed, then mute the media before
- // starting to play.
- PlayMuted = 1 << 4,
- };
-
- static Mode fromString(const WTF::String& token);
-};
-
-inline AutoplayExperimentConfig::Mode& operator|=(AutoplayExperimentConfig::Mode& a, const AutoplayExperimentConfig::Mode& b)
-{
- a = static_cast<AutoplayExperimentConfig::Mode>(
- static_cast<int>(a) | static_cast<int>(b));
- return a;
-}
-
-} // namespace blink
-
-#endif // AutoplayExperimentConfig_h
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/html/AutoplayExperimentConfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698