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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 #include "content/public/common/content_constants.h" | 73 #include "content/public/common/content_constants.h" |
74 #include "content/public/common/content_features.h" | 74 #include "content/public/common/content_features.h" |
75 #include "content/public/common/content_switches.h" | 75 #include "content/public/common/content_switches.h" |
76 #include "content/public/common/context_menu_params.h" | 76 #include "content/public/common/context_menu_params.h" |
77 #include "content/public/common/drop_data.h" | 77 #include "content/public/common/drop_data.h" |
78 #include "content/public/common/file_chooser_file_info.h" | 78 #include "content/public/common/file_chooser_file_info.h" |
79 #include "content/public/common/file_chooser_params.h" | 79 #include "content/public/common/file_chooser_params.h" |
80 #include "content/public/common/result_codes.h" | 80 #include "content/public/common/result_codes.h" |
81 #include "content/public/common/url_constants.h" | 81 #include "content/public/common/url_constants.h" |
82 #include "content/public/common/url_utils.h" | 82 #include "content/public/common/url_utils.h" |
| 83 #include "media/base/media_switches.h" |
83 #include "net/base/url_util.h" | 84 #include "net/base/url_util.h" |
84 #include "net/url_request/url_request_context_getter.h" | 85 #include "net/url_request/url_request_context_getter.h" |
85 #include "third_party/skia/include/core/SkBitmap.h" | 86 #include "third_party/skia/include/core/SkBitmap.h" |
86 #include "ui/base/clipboard/clipboard.h" | 87 #include "ui/base/clipboard/clipboard.h" |
87 #include "ui/base/touch/touch_device.h" | 88 #include "ui/base/touch/touch_device.h" |
88 #include "ui/base/touch/touch_enabled.h" | 89 #include "ui/base/touch/touch_enabled.h" |
89 #include "ui/base/ui_base_switches.h" | 90 #include "ui/base/ui_base_switches.h" |
90 #include "ui/gfx/animation/animation.h" | 91 #include "ui/gfx/animation/animation.h" |
91 #include "ui/gfx/color_space.h" | 92 #include "ui/gfx/color_space.h" |
92 #include "ui/gfx/image/image_skia.h" | 93 #include "ui/gfx/image/image_skia.h" |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 plugin_mixed_content_status == "BlockableMixedContent"; | 520 plugin_mixed_content_status == "BlockableMixedContent"; |
520 | 521 |
521 prefs.v8_cache_options = GetV8CacheOptions(); | 522 prefs.v8_cache_options = GetV8CacheOptions(); |
522 | 523 |
523 prefs.user_gesture_required_for_presentation = !command_line.HasSwitch( | 524 prefs.user_gesture_required_for_presentation = !command_line.HasSwitch( |
524 switches::kDisableGestureRequirementForPresentation); | 525 switches::kDisableGestureRequirementForPresentation); |
525 | 526 |
526 if (delegate_ && delegate_->HideDownloadUI()) | 527 if (delegate_ && delegate_->HideDownloadUI()) |
527 prefs.hide_download_ui = true; | 528 prefs.hide_download_ui = true; |
528 | 529 |
| 530 prefs.background_video_track_optimization_enabled = |
| 531 base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization); |
| 532 |
529 std::map<std::string, std::string> expensive_background_throttling_prefs; | 533 std::map<std::string, std::string> expensive_background_throttling_prefs; |
530 variations::GetVariationParamsByFeature( | 534 variations::GetVariationParamsByFeature( |
531 features::kExpensiveBackgroundTimerThrottling, | 535 features::kExpensiveBackgroundTimerThrottling, |
532 &expensive_background_throttling_prefs); | 536 &expensive_background_throttling_prefs); |
533 SetFloatParameterFromMap(expensive_background_throttling_prefs, "cpu_budget", | 537 SetFloatParameterFromMap(expensive_background_throttling_prefs, "cpu_budget", |
534 &prefs.expensive_background_throttling_cpu_budget); | 538 &prefs.expensive_background_throttling_cpu_budget); |
535 SetFloatParameterFromMap( | 539 SetFloatParameterFromMap( |
536 expensive_background_throttling_prefs, "initial_budget", | 540 expensive_background_throttling_prefs, "initial_budget", |
537 &prefs.expensive_background_throttling_initial_budget); | 541 &prefs.expensive_background_throttling_initial_budget); |
538 SetFloatParameterFromMap(expensive_background_throttling_prefs, "max_budget", | 542 SetFloatParameterFromMap(expensive_background_throttling_prefs, "max_budget", |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 } else { | 1077 } else { |
1074 render_view_ready_on_process_launch_ = true; | 1078 render_view_ready_on_process_launch_ = true; |
1075 } | 1079 } |
1076 } | 1080 } |
1077 | 1081 |
1078 void RenderViewHostImpl::RenderViewReady() { | 1082 void RenderViewHostImpl::RenderViewReady() { |
1079 delegate_->RenderViewReady(this); | 1083 delegate_->RenderViewReady(this); |
1080 } | 1084 } |
1081 | 1085 |
1082 } // namespace content | 1086 } // namespace content |
OLD | NEW |