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

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

Issue 2692903002: Don't show media controls when there is a persistent video. (Closed)
Patch Set: rebase Created 3 years, 10 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 unified diff | Download patch
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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 plugin_mixed_content_status == "BlockableMixedContent"; 525 plugin_mixed_content_status == "BlockableMixedContent";
526 526
527 prefs.v8_cache_options = GetV8CacheOptions(); 527 prefs.v8_cache_options = GetV8CacheOptions();
528 528
529 prefs.user_gesture_required_for_presentation = !command_line.HasSwitch( 529 prefs.user_gesture_required_for_presentation = !command_line.HasSwitch(
530 switches::kDisableGestureRequirementForPresentation); 530 switches::kDisableGestureRequirementForPresentation);
531 531
532 if (delegate_ && delegate_->HideDownloadUI()) 532 if (delegate_ && delegate_->HideDownloadUI())
533 prefs.hide_download_ui = true; 533 prefs.hide_download_ui = true;
534 534
535 // `media_controls_enabled` is `true` by default.
536 if (delegate_ && delegate_->HasPersistentVideo())
537 prefs.media_controls_enabled = false;
538
535 prefs.background_video_track_optimization_enabled = 539 prefs.background_video_track_optimization_enabled =
536 base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization); 540 base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization);
537 541
538 // TODO(avayvod, asvitkine): Query the value directly when it is available in 542 // TODO(avayvod, asvitkine): Query the value directly when it is available in
539 // the renderer process. See https://crbug.com/681160. 543 // the renderer process. See https://crbug.com/681160.
540 prefs.max_keyframe_distance_to_disable_background_video = 544 prefs.max_keyframe_distance_to_disable_background_video =
541 base::TimeDelta::FromMilliseconds( 545 base::TimeDelta::FromMilliseconds(
542 variations::GetVariationParamByFeatureAsInt( 546 variations::GetVariationParamByFeatureAsInt(
543 media::kBackgroundVideoTrackOptimization, 547 media::kBackgroundVideoTrackOptimization,
544 "max_keyframe_distance_ms", 548 "max_keyframe_distance_ms",
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 } else { 953 } else {
950 render_view_ready_on_process_launch_ = true; 954 render_view_ready_on_process_launch_ = true;
951 } 955 }
952 } 956 }
953 957
954 void RenderViewHostImpl::RenderViewReady() { 958 void RenderViewHostImpl::RenderViewReady() {
955 delegate_->RenderViewReady(this); 959 delegate_->RenderViewReady(this);
956 } 960 }
957 961
958 } // namespace content 962 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_delegate.cc ('k') | content/browser/web_contents/web_contents_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698