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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2472773005: Remove autoplay-muted-videos feature flag. (Closed)
Patch Set: update java code Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/android/chrome_feature_list.cc ('k') | content/child/runtime_features.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 433
434 #if defined(OS_ANDROID) 434 #if defined(OS_ANDROID)
435 // On Android, user gestures are normally required, unless that requirement 435 // On Android, user gestures are normally required, unless that requirement
436 // is disabled with a command-line switch or the equivalent field trial is 436 // is disabled with a command-line switch or the equivalent field trial is
437 // is set to "Enabled". 437 // is set to "Enabled".
438 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( 438 const std::string autoplay_group_name = base::FieldTrialList::FindFullName(
439 "MediaElementAutoplay"); 439 "MediaElementAutoplay");
440 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( 440 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch(
441 switches::kDisableGestureRequirementForMediaPlayback) && 441 switches::kDisableGestureRequirementForMediaPlayback) &&
442 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); 442 (autoplay_group_name.empty() || autoplay_group_name != "Enabled");
443 prefs.autoplay_muted_videos_enabled =
444 base::FeatureList::IsEnabled(features::kAutoplayMutedVideos);
445 443
446 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); 444 prefs.progress_bar_completion = GetProgressBarCompletionPolicy();
447 445
448 prefs.use_solid_color_scrollbars = true; 446 prefs.use_solid_color_scrollbars = true;
449 #endif 447 #endif
450 448
451 // Handle autoplay gesture override experiment. 449 // Handle autoplay gesture override experiment.
452 // Note that anything but a well-formed string turns the experiment off. 450 // Note that anything but a well-formed string turns the experiment off.
453 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( 451 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName(
454 "MediaElementGestureOverrideExperiment"); 452 "MediaElementGestureOverrideExperiment");
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 } else { 1095 } else {
1098 render_view_ready_on_process_launch_ = true; 1096 render_view_ready_on_process_launch_ = true;
1099 } 1097 }
1100 } 1098 }
1101 1099
1102 void RenderViewHostImpl::RenderViewReady() { 1100 void RenderViewHostImpl::RenderViewReady() {
1103 delegate_->RenderViewReady(this); 1101 delegate_->RenderViewReady(this);
1104 } 1102 }
1105 1103
1106 } // namespace content 1104 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_feature_list.cc ('k') | content/child/runtime_features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698