| OLD | NEW |
| 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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 if (delegate_ && delegate_->HideDownloadUI()) | 545 if (delegate_ && delegate_->HideDownloadUI()) |
| 546 prefs.hide_download_ui = true; | 546 prefs.hide_download_ui = true; |
| 547 | 547 |
| 548 // `media_controls_enabled` is `true` by default. | 548 // `media_controls_enabled` is `true` by default. |
| 549 if (delegate_ && delegate_->HasPersistentVideo()) | 549 if (delegate_ && delegate_->HasPersistentVideo()) |
| 550 prefs.media_controls_enabled = false; | 550 prefs.media_controls_enabled = false; |
| 551 | 551 |
| 552 prefs.background_video_track_optimization_enabled = | 552 prefs.background_video_track_optimization_enabled = |
| 553 base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization); | 553 base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization); |
| 554 | 554 |
| 555 prefs.new_remote_playback_pipeline_enabled = |
| 556 base::FeatureList::IsEnabled(media::kNewRemotePlaybackPipeline); |
| 557 |
| 555 // TODO(servolk, asvitkine): Query the value directly when it is available in | 558 // TODO(servolk, asvitkine): Query the value directly when it is available in |
| 556 // the renderer process. See https://crbug.com/681160. | 559 // the renderer process. See https://crbug.com/681160. |
| 557 prefs.enable_instant_source_buffer_gc = | 560 prefs.enable_instant_source_buffer_gc = |
| 558 variations::GetVariationParamByFeatureAsBool( | 561 variations::GetVariationParamByFeatureAsBool( |
| 559 media::kMemoryPressureBasedSourceBufferGC, | 562 media::kMemoryPressureBasedSourceBufferGC, |
| 560 "enable_instant_source_buffer_gc", false); | 563 "enable_instant_source_buffer_gc", false); |
| 561 | 564 |
| 562 std::map<std::string, std::string> expensive_background_throttling_prefs; | 565 std::map<std::string, std::string> expensive_background_throttling_prefs; |
| 563 variations::GetVariationParamsByFeature( | 566 variations::GetVariationParamsByFeature( |
| 564 features::kExpensiveBackgroundTimerThrottling, | 567 features::kExpensiveBackgroundTimerThrottling, |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 } | 959 } |
| 957 | 960 |
| 958 void RenderViewHostImpl::ClosePageTimeout() { | 961 void RenderViewHostImpl::ClosePageTimeout() { |
| 959 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) | 962 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) |
| 960 return; | 963 return; |
| 961 | 964 |
| 962 ClosePageIgnoringUnloadEvents(); | 965 ClosePageIgnoringUnloadEvents(); |
| 963 } | 966 } |
| 964 | 967 |
| 965 } // namespace content | 968 } // namespace content |
| OLD | NEW |