| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 #include "content/public/browser/child_process_security_policy.h" | 145 #include "content/public/browser/child_process_security_policy.h" |
| 146 #include "content/public/browser/client_certificate_delegate.h" | 146 #include "content/public/browser/client_certificate_delegate.h" |
| 147 #include "content/public/browser/navigation_handle.h" | 147 #include "content/public/browser/navigation_handle.h" |
| 148 #include "content/public/browser/navigation_throttle.h" | 148 #include "content/public/browser/navigation_throttle.h" |
| 149 #include "content/public/browser/render_frame_host.h" | 149 #include "content/public/browser/render_frame_host.h" |
| 150 #include "content/public/browser/render_process_host.h" | 150 #include "content/public/browser/render_process_host.h" |
| 151 #include "content/public/browser/render_view_host.h" | 151 #include "content/public/browser/render_view_host.h" |
| 152 #include "content/public/browser/resource_context.h" | 152 #include "content/public/browser/resource_context.h" |
| 153 #include "content/public/browser/site_instance.h" | 153 #include "content/public/browser/site_instance.h" |
| 154 #include "content/public/browser/storage_partition.h" | 154 #include "content/public/browser/storage_partition.h" |
| 155 #include "content/public/browser/vpn_service_proxy.h" |
| 155 #include "content/public/browser/web_contents.h" | 156 #include "content/public/browser/web_contents.h" |
| 156 #include "content/public/common/child_process_host.h" | 157 #include "content/public/common/child_process_host.h" |
| 157 #include "content/public/common/content_descriptors.h" | 158 #include "content/public/common/content_descriptors.h" |
| 158 #include "content/public/common/content_features.h" | 159 #include "content/public/common/content_features.h" |
| 159 #include "content/public/common/content_switches.h" | 160 #include "content/public/common/content_switches.h" |
| 160 #include "content/public/common/sandbox_type.h" | 161 #include "content/public/common/sandbox_type.h" |
| 161 #include "content/public/common/service_registry.h" | 162 #include "content/public/common/service_registry.h" |
| 162 #include "content/public/common/url_utils.h" | 163 #include "content/public/common/url_utils.h" |
| 163 #include "content/public/common/web_preferences.h" | 164 #include "content/public/common/web_preferences.h" |
| 164 #include "device/usb/public/interfaces/chooser_service.mojom.h" | 165 #include "device/usb/public/interfaces/chooser_service.mojom.h" |
| (...skipping 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2508 content::BrowserContext* browser_context, | 2509 content::BrowserContext* browser_context, |
| 2509 const GURL& url) { | 2510 const GURL& url) { |
| 2510 #if defined(ENABLE_PLUGINS) && defined(ENABLE_EXTENSIONS) | 2511 #if defined(ENABLE_PLUGINS) && defined(ENABLE_EXTENSIONS) |
| 2511 return ChromeContentBrowserClientPluginsPart::IsPepperVpnProviderAPIAllowed( | 2512 return ChromeContentBrowserClientPluginsPart::IsPepperVpnProviderAPIAllowed( |
| 2512 browser_context, url); | 2513 browser_context, url); |
| 2513 #else | 2514 #else |
| 2514 return false; | 2515 return false; |
| 2515 #endif | 2516 #endif |
| 2516 } | 2517 } |
| 2517 | 2518 |
| 2519 std::unique_ptr<content::VpnServiceProxy> |
| 2520 ChromeContentBrowserClient::GetVpnServiceProxy( |
| 2521 content::BrowserContext* browser_context) { |
| 2522 #if defined(ENABLE_EXTENSIONS) |
| 2523 return ChromeContentBrowserClientExtensionsPart::GetVpnServiceProxy( |
| 2524 browser_context); |
| 2525 #else |
| 2526 return nullptr; |
| 2527 #endif |
| 2528 } |
| 2529 |
| 2518 ui::SelectFilePolicy* ChromeContentBrowserClient::CreateSelectFilePolicy( | 2530 ui::SelectFilePolicy* ChromeContentBrowserClient::CreateSelectFilePolicy( |
| 2519 WebContents* web_contents) { | 2531 WebContents* web_contents) { |
| 2520 return new ChromeSelectFilePolicy(web_contents); | 2532 return new ChromeSelectFilePolicy(web_contents); |
| 2521 } | 2533 } |
| 2522 | 2534 |
| 2523 void ChromeContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( | 2535 void ChromeContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( |
| 2524 std::vector<std::string>* additional_allowed_schemes) { | 2536 std::vector<std::string>* additional_allowed_schemes) { |
| 2525 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( | 2537 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( |
| 2526 additional_allowed_schemes); | 2538 additional_allowed_schemes); |
| 2527 additional_allowed_schemes->push_back(content::kChromeDevToolsScheme); | 2539 additional_allowed_schemes->push_back(content::kChromeDevToolsScheme); |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2972 if (channel <= kMaxDisableEncryptionChannel) { | 2984 if (channel <= kMaxDisableEncryptionChannel) { |
| 2973 static const char* const kWebRtcDevSwitchNames[] = { | 2985 static const char* const kWebRtcDevSwitchNames[] = { |
| 2974 switches::kDisableWebRtcEncryption, | 2986 switches::kDisableWebRtcEncryption, |
| 2975 }; | 2987 }; |
| 2976 to_command_line->CopySwitchesFrom(from_command_line, | 2988 to_command_line->CopySwitchesFrom(from_command_line, |
| 2977 kWebRtcDevSwitchNames, | 2989 kWebRtcDevSwitchNames, |
| 2978 arraysize(kWebRtcDevSwitchNames)); | 2990 arraysize(kWebRtcDevSwitchNames)); |
| 2979 } | 2991 } |
| 2980 } | 2992 } |
| 2981 #endif // defined(ENABLE_WEBRTC) | 2993 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |