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 2328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2493 content::BrowserContext* browser_context, | 2494 content::BrowserContext* browser_context, |
2494 const GURL& url) { | 2495 const GURL& url) { |
2495 #if defined(ENABLE_PLUGINS) && defined(ENABLE_EXTENSIONS) | 2496 #if defined(ENABLE_PLUGINS) && defined(ENABLE_EXTENSIONS) |
2496 return ChromeContentBrowserClientPluginsPart::IsPepperVpnProviderAPIAllowed( | 2497 return ChromeContentBrowserClientPluginsPart::IsPepperVpnProviderAPIAllowed( |
2497 browser_context, url); | 2498 browser_context, url); |
2498 #else | 2499 #else |
2499 return false; | 2500 return false; |
2500 #endif | 2501 #endif |
2501 } | 2502 } |
2502 | 2503 |
| 2504 std::unique_ptr<content::VpnServiceProxy> |
| 2505 ChromeContentBrowserClient::GetVpnServiceProxy( |
| 2506 content::BrowserContext* browser_context) { |
| 2507 #if defined(ENABLE_EXTENSIONS) |
| 2508 return ChromeContentBrowserClientExtensionsPart::GetVpnServiceProxy( |
| 2509 browser_context); |
| 2510 #else |
| 2511 return nullptr; |
| 2512 #endif |
| 2513 } |
| 2514 |
2503 ui::SelectFilePolicy* ChromeContentBrowserClient::CreateSelectFilePolicy( | 2515 ui::SelectFilePolicy* ChromeContentBrowserClient::CreateSelectFilePolicy( |
2504 WebContents* web_contents) { | 2516 WebContents* web_contents) { |
2505 return new ChromeSelectFilePolicy(web_contents); | 2517 return new ChromeSelectFilePolicy(web_contents); |
2506 } | 2518 } |
2507 | 2519 |
2508 void ChromeContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( | 2520 void ChromeContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( |
2509 std::vector<std::string>* additional_allowed_schemes) { | 2521 std::vector<std::string>* additional_allowed_schemes) { |
2510 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( | 2522 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( |
2511 additional_allowed_schemes); | 2523 additional_allowed_schemes); |
2512 additional_allowed_schemes->push_back(content::kChromeDevToolsScheme); | 2524 additional_allowed_schemes->push_back(content::kChromeDevToolsScheme); |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2957 if (channel <= kMaxDisableEncryptionChannel) { | 2969 if (channel <= kMaxDisableEncryptionChannel) { |
2958 static const char* const kWebRtcDevSwitchNames[] = { | 2970 static const char* const kWebRtcDevSwitchNames[] = { |
2959 switches::kDisableWebRtcEncryption, | 2971 switches::kDisableWebRtcEncryption, |
2960 }; | 2972 }; |
2961 to_command_line->CopySwitchesFrom(from_command_line, | 2973 to_command_line->CopySwitchesFrom(from_command_line, |
2962 kWebRtcDevSwitchNames, | 2974 kWebRtcDevSwitchNames, |
2963 arraysize(kWebRtcDevSwitchNames)); | 2975 arraysize(kWebRtcDevSwitchNames)); |
2964 } | 2976 } |
2965 } | 2977 } |
2966 #endif // defined(ENABLE_WEBRTC) | 2978 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |