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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2640023008: Enabling autoplay and fullscreen for downloaded media (Closed)
Patch Set: removed include 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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after
2652 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 2652 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
2653 switches::kEnablePotentiallyAnnoyingSecurityFeatures)) { 2653 switches::kEnablePotentiallyAnnoyingSecurityFeatures)) {
2654 web_prefs->disable_reading_from_canvas = true; 2654 web_prefs->disable_reading_from_canvas = true;
2655 web_prefs->strict_mixed_content_checking = true; 2655 web_prefs->strict_mixed_content_checking = true;
2656 web_prefs->strict_powerful_feature_restrictions = true; 2656 web_prefs->strict_powerful_feature_restrictions = true;
2657 } 2657 }
2658 2658
2659 web_prefs->data_saver_enabled = GetDataSaverEnabledPref(prefs); 2659 web_prefs->data_saver_enabled = GetDataSaverEnabledPref(prefs);
2660 2660
2661 #if defined(OS_ANDROID) 2661 #if defined(OS_ANDROID)
2662 if (base::FeatureList::IsEnabled( 2662 content::WebContents* contents =
2663 features::kAllowAutoplayUnmutedInWebappManifestScope)) { 2663 content::WebContents::FromRenderViewHost(rvh);
2664 content::WebContents* contents = 2664 if (contents) {
2665 content::WebContents::FromRenderViewHost(rvh); 2665 TabAndroid* tab_android = TabAndroid::FromWebContents(contents);
2666 if (contents) { 2666 if (tab_android) {
2667 TabAndroid* tab_android = TabAndroid::FromWebContents(contents); 2667 web_prefs->embedded_media_experience_enabled =
2668 if (tab_android) { 2668 tab_android->ShouldEnableEmbeddedMediaExperience();
2669
2670 if (base::FeatureList::IsEnabled(
2671 features::kAllowAutoplayUnmutedInWebappManifestScope)) {
2669 web_prefs->media_playback_gesture_whitelist_scope = 2672 web_prefs->media_playback_gesture_whitelist_scope =
2670 tab_android->GetWebappManifestScope(); 2673 tab_android->GetWebappManifestScope();
2671 } 2674 }
2672 } 2675 }
2673 } 2676 }
2674 #endif // defined(OS_ANDROID) 2677 #endif // defined(OS_ANDROID)
2675 2678
2676 for (size_t i = 0; i < extra_parts_.size(); ++i) 2679 for (size_t i = 0; i < extra_parts_.size(); ++i)
2677 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs); 2680 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs);
2678 } 2681 }
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
3541 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3544 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3542 return variations::GetVariationParamValue( 3545 return variations::GetVariationParamValue(
3543 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3546 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3544 } 3547 }
3545 3548
3546 // static 3549 // static
3547 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3550 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3548 const storage::QuotaSettings* settings) { 3551 const storage::QuotaSettings* settings) {
3549 g_default_quota_settings = settings; 3552 g_default_quota_settings = settings;
3550 } 3553 }
OLDNEW
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698