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

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

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.cc
diff --git a/content/public/common/web_preferences.cc b/content/public/common/web_preferences.cc
index 16ac5ba6f5275630807d7abd2def9ec21547cb5a..54adf286d626a201a789058bb557f715877cb146 100644
--- a/content/public/common/web_preferences.cc
+++ b/content/public/common/web_preferences.cc
@@ -191,7 +191,6 @@ WebPreferences::WebPreferences()
force_enable_zoom(false),
fullscreen_supported(true),
double_tap_to_zoom_enabled(true),
- user_gesture_required_for_media_playback(true),
support_deprecated_target_density_dpi(false),
use_legacy_background_size_shorthand_behavior(false),
wide_viewport_quirk(false),
@@ -211,8 +210,6 @@ WebPreferences::WebPreferences()
video_rotate_to_fullscreen_enabled(false),
video_fullscreen_detection_enabled(false),
embedded_media_experience_enabled(false),
-#else // defined(OS_ANDROID)
- cross_origin_media_playback_requires_user_gesture(false),
#endif // defined(OS_ANDROID)
#if defined(OS_ANDROID)
default_minimum_page_scale_factor(0.25f),
@@ -229,7 +226,12 @@ WebPreferences::WebPreferences()
enable_instant_source_buffer_gc(false),
presentation_receiver(false),
media_controls_enabled(true),
- do_not_update_selection_on_mutating_selection_range(false) {
+ do_not_update_selection_on_mutating_selection_range(false),
+#if defined(OS_ANDROID)
+ autoplay_policy(AutoplayPolicy::kUserGestureRequired) {
+#else
+ autoplay_policy(AutoplayPolicy::kNoUserGestureRequired) {
+#endif // defined(OS_ANDROID)
standard_font_family_map[kCommonScript] =
base::ASCIIToUTF16("Times New Roman");
fixed_font_family_map[kCommonScript] = base::ASCIIToUTF16("Courier New");

Powered by Google App Engine
This is Rietveld 408576698