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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2628313002: [Media] Plumb a feature parameter for the background video keyframe distance. (Closed)
Patch Set: Changed the param to milliseconds Created 3 years, 11 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
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 3a1a11e203039e28b49277e21e54c1263fad6d7c..6be34a6c69c289ae1c6f054bb9fd8cf7de09bd89 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -541,6 +541,15 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() {
prefs.background_video_track_optimization_enabled =
base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization);
+ // TODO(avayvod, asvitkine): Query the value directly when it is available in
+ // the renderer process. See https://crbug.com/681160.
+ prefs.max_keyframe_distance_to_disable_background_video =
+ base::TimeDelta::FromMilliseconds(
+ variations::GetVariationParamByFeatureAsInt(
+ media::kBackgroundVideoTrackOptimization,
+ "max_keyframe_distance_ms",
+ base::TimeDelta::FromSeconds(10).InMilliseconds()));
+
std::map<std::string, std::string> expensive_background_throttling_prefs;
variations::GetVariationParamsByFeature(
features::kExpensiveBackgroundTimerThrottling,
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698