| 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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 | 863 |
| 864 SingleTabModeTabHelper::FromWebContents(web_contents)->HandleOpenUrl(params); | 864 SingleTabModeTabHelper::FromWebContents(web_contents)->HandleOpenUrl(params); |
| 865 } | 865 } |
| 866 #endif // defined(OS_ANDROID) | 866 #endif // defined(OS_ANDROID) |
| 867 | 867 |
| 868 #if BUILDFLAG(ENABLE_EXTENSIONS) | 868 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 869 // By default, JavaScript, images and autoplay are enabled in guest content. | 869 // By default, JavaScript, images and autoplay are enabled in guest content. |
| 870 void GetGuestViewDefaultContentSettingRules( | 870 void GetGuestViewDefaultContentSettingRules( |
| 871 bool incognito, | 871 bool incognito, |
| 872 RendererContentSettingRules* rules) { | 872 RendererContentSettingRules* rules) { |
| 873 rules->image_rules.push_back( | 873 rules->image_rules.push_back(ContentSettingPatternSource( |
| 874 ContentSettingPatternSource(ContentSettingsPattern::Wildcard(), | 874 ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), |
| 875 ContentSettingsPattern::Wildcard(), | 875 CONTENT_SETTING_ALLOW, base::Time(), std::string(), incognito)); |
| 876 CONTENT_SETTING_ALLOW, | |
| 877 std::string(), | |
| 878 incognito)); | |
| 879 | 876 |
| 880 rules->script_rules.push_back( | 877 rules->script_rules.push_back(ContentSettingPatternSource( |
| 881 ContentSettingPatternSource(ContentSettingsPattern::Wildcard(), | 878 ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), |
| 882 ContentSettingsPattern::Wildcard(), | 879 CONTENT_SETTING_ALLOW, base::Time(), std::string(), incognito)); |
| 883 CONTENT_SETTING_ALLOW, | 880 rules->autoplay_rules.push_back(ContentSettingPatternSource( |
| 884 std::string(), | 881 ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), |
| 885 incognito)); | 882 CONTENT_SETTING_ALLOW, base::Time(), std::string(), incognito)); |
| 886 rules->autoplay_rules.push_back( | |
| 887 ContentSettingPatternSource(ContentSettingsPattern::Wildcard(), | |
| 888 ContentSettingsPattern::Wildcard(), | |
| 889 CONTENT_SETTING_ALLOW, | |
| 890 std::string(), | |
| 891 incognito)); | |
| 892 } | 883 } |
| 893 #endif // BUILDFLAG(ENABLE_EXTENSIONS) | 884 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
| 894 | 885 |
| 895 void CreateUsbDeviceManager( | 886 void CreateUsbDeviceManager( |
| 896 RenderFrameHost* render_frame_host, | 887 RenderFrameHost* render_frame_host, |
| 897 mojo::InterfaceRequest<device::usb::DeviceManager> request) { | 888 mojo::InterfaceRequest<device::usb::DeviceManager> request) { |
| 898 WebContents* web_contents = | 889 WebContents* web_contents = |
| 899 WebContents::FromRenderFrameHost(render_frame_host); | 890 WebContents::FromRenderFrameHost(render_frame_host); |
| 900 if (!web_contents) { | 891 if (!web_contents) { |
| 901 NOTREACHED(); | 892 NOTREACHED(); |
| (...skipping 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3619 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3610 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3620 return variations::GetVariationParamValue( | 3611 return variations::GetVariationParamValue( |
| 3621 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3612 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3622 } | 3613 } |
| 3623 | 3614 |
| 3624 // static | 3615 // static |
| 3625 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3616 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3626 const storage::QuotaSettings* settings) { | 3617 const storage::QuotaSettings* settings) { |
| 3627 g_default_quota_settings = settings; | 3618 g_default_quota_settings = settings; |
| 3628 } | 3619 } |
| OLD | NEW |