| 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 2565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2576 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 2576 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 2577 switches::kEnablePotentiallyAnnoyingSecurityFeatures)) { | 2577 switches::kEnablePotentiallyAnnoyingSecurityFeatures)) { |
| 2578 web_prefs->disable_reading_from_canvas = true; | 2578 web_prefs->disable_reading_from_canvas = true; |
| 2579 web_prefs->strict_mixed_content_checking = true; | 2579 web_prefs->strict_mixed_content_checking = true; |
| 2580 web_prefs->strict_powerful_feature_restrictions = true; | 2580 web_prefs->strict_powerful_feature_restrictions = true; |
| 2581 } | 2581 } |
| 2582 | 2582 |
| 2583 web_prefs->data_saver_enabled = GetDataSaverEnabledPref(prefs); | 2583 web_prefs->data_saver_enabled = GetDataSaverEnabledPref(prefs); |
| 2584 | 2584 |
| 2585 #if defined(OS_ANDROID) | 2585 #if defined(OS_ANDROID) |
| 2586 content::WebContents* contents = | 2586 if (base::FeatureList::IsEnabled( |
| 2587 content::WebContents::FromRenderViewHost(rvh); | 2587 features::kAllowAutoplayUnmutedInWebappManifestScope)) { |
| 2588 if (contents) { | 2588 content::WebContents* contents = |
| 2589 TabAndroid* tab_android = TabAndroid::FromWebContents(contents); | 2589 content::WebContents::FromRenderViewHost(rvh); |
| 2590 if (tab_android) { | 2590 if (contents) { |
| 2591 web_prefs->media_playback_gesture_whitelist_scope = | 2591 TabAndroid* tab_android = TabAndroid::FromWebContents(contents); |
| 2592 tab_android->GetWebappManifestScope(); | 2592 if (tab_android) { |
| 2593 web_prefs->media_playback_gesture_whitelist_scope = |
| 2594 tab_android->GetWebappManifestScope(); |
| 2595 } |
| 2593 } | 2596 } |
| 2594 } | 2597 } |
| 2595 #endif // defined(OS_ANDROID) | 2598 #endif // defined(OS_ANDROID) |
| 2596 | 2599 |
| 2597 for (size_t i = 0; i < extra_parts_.size(); ++i) | 2600 for (size_t i = 0; i < extra_parts_.size(); ++i) |
| 2598 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs); | 2601 extra_parts_[i]->OverrideWebkitPrefs(rvh, web_prefs); |
| 2599 } | 2602 } |
| 2600 | 2603 |
| 2601 void ChromeContentBrowserClient::BrowserURLHandlerCreated( | 2604 void ChromeContentBrowserClient::BrowserURLHandlerCreated( |
| 2602 BrowserURLHandler* handler) { | 2605 BrowserURLHandler* handler) { |
| (...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3447 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3450 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3448 return variations::GetVariationParamValue( | 3451 return variations::GetVariationParamValue( |
| 3449 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3452 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3450 } | 3453 } |
| 3451 | 3454 |
| 3452 // static | 3455 // static |
| 3453 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3456 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3454 const storage::QuotaSettings* settings) { | 3457 const storage::QuotaSettings* settings) { |
| 3455 g_default_quota_settings = settings; | 3458 g_default_quota_settings = settings; |
| 3456 } | 3459 } |
| OLD | NEW |