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

Unified Diff: third_party/WebKit/Source/core/html/media/AutoplayPolicy.h

Issue 2850553002: Autoplay: use an autoplay policy setting in Blink. (Closed)
Patch Set: Created 3 years, 8 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: third_party/WebKit/Source/core/html/media/AutoplayPolicy.h
diff --git a/third_party/WebKit/Source/core/html/media/AutoplayPolicy.h b/third_party/WebKit/Source/core/html/media/AutoplayPolicy.h
index 8e20d46c478082673517bb99a75eb2cfae47d249..83514450ab896b5acc179879d423c65d17bf1d81 100644
--- a/third_party/WebKit/Source/core/html/media/AutoplayPolicy.h
+++ b/third_party/WebKit/Source/core/html/media/AutoplayPolicy.h
@@ -6,6 +6,7 @@
#define AutoplayPolicy_h
#include "bindings/core/v8/Nullable.h"
+#include "core/CoreExport.h"
#include "core/dom/ExceptionCode.h"
#include "platform/heap/Handle.h"
@@ -19,6 +20,15 @@ class HTMLMediaElement;
// AutoplayPolicy is the class for handles autoplay logics.
class AutoplayPolicy final : public GarbageCollected<AutoplayPolicy> {
public:
+ // Different autoplay policy types.
+ enum class Type {
+ kNoUserGestureRequired = 0,
+ kCrossOriginUserGestureRequired,
+ kUserGestureRequired,
+ };
+
+ CORE_EXPORT static Type GetAutoplayPolicyForDocument(const Document&);
+
explicit AutoplayPolicy(HTMLMediaElement*);
void VideoWillBeDrawnToCanvas() const;

Powered by Google App Engine
This is Rietveld 408576698