| 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 "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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |