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

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

Issue 2487373003: Disable background video track behind a feature flag (Closed)
Patch Set: Added the feature flag to histograms.xml 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
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "content/public/common/content_constants.h" 74 #include "content/public/common/content_constants.h"
75 #include "content/public/common/content_features.h" 75 #include "content/public/common/content_features.h"
76 #include "content/public/common/content_switches.h" 76 #include "content/public/common/content_switches.h"
77 #include "content/public/common/context_menu_params.h" 77 #include "content/public/common/context_menu_params.h"
78 #include "content/public/common/drop_data.h" 78 #include "content/public/common/drop_data.h"
79 #include "content/public/common/file_chooser_file_info.h" 79 #include "content/public/common/file_chooser_file_info.h"
80 #include "content/public/common/file_chooser_params.h" 80 #include "content/public/common/file_chooser_params.h"
81 #include "content/public/common/result_codes.h" 81 #include "content/public/common/result_codes.h"
82 #include "content/public/common/url_constants.h" 82 #include "content/public/common/url_constants.h"
83 #include "content/public/common/url_utils.h" 83 #include "content/public/common/url_utils.h"
84 #include "media/base/media_switches.h"
84 #include "net/base/filename_util.h" 85 #include "net/base/filename_util.h"
85 #include "net/base/url_util.h" 86 #include "net/base/url_util.h"
86 #include "net/url_request/url_request_context_getter.h" 87 #include "net/url_request/url_request_context_getter.h"
87 #include "storage/browser/fileapi/isolated_context.h" 88 #include "storage/browser/fileapi/isolated_context.h"
88 #include "third_party/skia/include/core/SkBitmap.h" 89 #include "third_party/skia/include/core/SkBitmap.h"
89 #include "ui/base/clipboard/clipboard.h" 90 #include "ui/base/clipboard/clipboard.h"
90 #include "ui/base/touch/touch_device.h" 91 #include "ui/base/touch/touch_device.h"
91 #include "ui/base/touch/touch_enabled.h" 92 #include "ui/base/touch/touch_enabled.h"
92 #include "ui/base/ui_base_switches.h" 93 #include "ui/base/ui_base_switches.h"
93 #include "ui/gfx/animation/animation.h" 94 #include "ui/gfx/animation/animation.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 plugin_mixed_content_status == "BlockableMixedContent"; 578 plugin_mixed_content_status == "BlockableMixedContent";
578 579
579 prefs.v8_cache_options = GetV8CacheOptions(); 580 prefs.v8_cache_options = GetV8CacheOptions();
580 581
581 prefs.user_gesture_required_for_presentation = !command_line.HasSwitch( 582 prefs.user_gesture_required_for_presentation = !command_line.HasSwitch(
582 switches::kDisableGestureRequirementForPresentation); 583 switches::kDisableGestureRequirementForPresentation);
583 584
584 if (delegate_ && delegate_->HideDownloadUI()) 585 if (delegate_ && delegate_->HideDownloadUI())
585 prefs.hide_download_ui = true; 586 prefs.hide_download_ui = true;
586 587
588 prefs.background_video_track_optimization_enabled =
589 base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization);
590
587 std::map<std::string, std::string> expensive_background_throttling_prefs; 591 std::map<std::string, std::string> expensive_background_throttling_prefs;
588 variations::GetVariationParamsByFeature( 592 variations::GetVariationParamsByFeature(
589 features::kExpensiveBackgroundTimerThrottling, 593 features::kExpensiveBackgroundTimerThrottling,
590 &expensive_background_throttling_prefs); 594 &expensive_background_throttling_prefs);
591 SetFloatParameterFromMap(expensive_background_throttling_prefs, "cpu_budget", 595 SetFloatParameterFromMap(expensive_background_throttling_prefs, "cpu_budget",
592 &prefs.expensive_background_throttling_cpu_budget); 596 &prefs.expensive_background_throttling_cpu_budget);
593 SetFloatParameterFromMap( 597 SetFloatParameterFromMap(
594 expensive_background_throttling_prefs, "initial_budget", 598 expensive_background_throttling_prefs, "initial_budget",
595 &prefs.expensive_background_throttling_initial_budget); 599 &prefs.expensive_background_throttling_initial_budget);
596 SetFloatParameterFromMap(expensive_background_throttling_prefs, "max_budget", 600 SetFloatParameterFromMap(expensive_background_throttling_prefs, "max_budget",
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 // Note: We are using the origin URL provided by the sender here. It may be 1294 // Note: We are using the origin URL provided by the sender here. It may be
1291 // different from the receiver's. 1295 // different from the receiver's.
1292 file_system_file.url = 1296 file_system_file.url =
1293 GURL(storage::GetIsolatedFileSystemRootURIString( 1297 GURL(storage::GetIsolatedFileSystemRootURIString(
1294 file_system_url.origin(), filesystem_id, std::string()) 1298 file_system_url.origin(), filesystem_id, std::string())
1295 .append(register_name)); 1299 .append(register_name));
1296 } 1300 }
1297 } 1301 }
1298 1302
1299 } // namespace content 1303 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698