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

Unified Diff: content/public/common/web_preferences.h

Issue 2846623003: Make autoplay policies no longer platform dependant. (Closed)
Patch Set: fix webview Created 3 years, 7 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: content/public/common/web_preferences.h
diff --git a/content/public/common/web_preferences.h b/content/public/common/web_preferences.h
index 3d8a224b2599045dfb36f72034277bbc4be7e37f..e1272e9f9d9c2ee746a56decaa09c7acabd87167 100644
--- a/content/public/common/web_preferences.h
+++ b/content/public/common/web_preferences.h
@@ -66,6 +66,14 @@ enum class ProgressBarCompletion {
LAST = RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES
};
+// Defines the autoplay policy to be used. Should match the class in
+// WebSettings.h.
+enum class AutoplayPolicy {
+ kNoUserGestureRequired,
+ kCrossOriginUserGestureRequired,
Bernhard Bauer 2017/05/09 12:47:17 Nit: "cross origin" here qualifies the requirement
mlamouri (slow - plz ping) 2017/05/09 17:24:35 Fair enough. I've renamed the autoplay flag option
+ kUserGestureRequired,
+};
+
// The ISO 15924 script code for undetermined script aka Common. It's the
// default used on WebKit's side to get/set a font setting when no script is
// specified.
@@ -223,7 +231,6 @@ struct CONTENT_EXPORT WebPreferences {
bool force_enable_zoom;
bool fullscreen_supported;
bool double_tap_to_zoom_enabled;
- bool user_gesture_required_for_media_playback;
std::string media_playback_gesture_whitelist_scope;
GURL default_video_poster_url;
bool support_deprecated_target_density_dpi;
@@ -254,7 +261,6 @@ struct CONTENT_EXPORT WebPreferences {
bool video_fullscreen_detection_enabled;
bool embedded_media_experience_enabled;
#else // defined(OS_ANDROID)
- bool cross_origin_media_playback_requires_user_gesture;
#endif // defined(OS_ANDROID)
// Default (used if the page or UA doesn't override these) values for page
@@ -289,6 +295,9 @@ struct CONTENT_EXPORT WebPreferences {
// TODO(changwan): remove this once we no longer support Android N.
bool do_not_update_selection_on_mutating_selection_range;
+ // Defines the current autoplay policy.
+ AutoplayPolicy autoplay_policy;
+
// We try to keep the default values the same as the default values in
// chrome, except for the cases where it would require lots of extra work for
// the embedder to use the same default value.

Powered by Google App Engine
This is Rietveld 408576698