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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 #include "device/bluetooth/public/interfaces/adapter.mojom.h" | 177 #include "device/bluetooth/public/interfaces/adapter.mojom.h" |
178 #include "device/usb/public/interfaces/chooser_service.mojom.h" | 178 #include "device/usb/public/interfaces/chooser_service.mojom.h" |
179 #include "device/usb/public/interfaces/device_manager.mojom.h" | 179 #include "device/usb/public/interfaces/device_manager.mojom.h" |
180 #include "extensions/features/features.h" | 180 #include "extensions/features/features.h" |
181 #include "gin/v8_initializer.h" | 181 #include "gin/v8_initializer.h" |
182 #include "net/base/mime_util.h" | 182 #include "net/base/mime_util.h" |
183 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 183 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
184 #include "net/cookies/canonical_cookie.h" | 184 #include "net/cookies/canonical_cookie.h" |
185 #include "net/cookies/cookie_options.h" | 185 #include "net/cookies/cookie_options.h" |
186 #include "net/ssl/ssl_cert_request_info.h" | 186 #include "net/ssl/ssl_cert_request_info.h" |
| 187 #include "ppapi/features/features.h" |
187 #include "ppapi/host/ppapi_host.h" | 188 #include "ppapi/host/ppapi_host.h" |
188 #include "printing/features/features.h" | 189 #include "printing/features/features.h" |
189 #include "services/image_decoder/public/interfaces/constants.mojom.h" | 190 #include "services/image_decoder/public/interfaces/constants.mojom.h" |
190 #include "services/service_manager/public/cpp/interface_provider.h" | 191 #include "services/service_manager/public/cpp/interface_provider.h" |
191 #include "services/service_manager/public/cpp/interface_registry.h" | 192 #include "services/service_manager/public/cpp/interface_registry.h" |
192 #include "services/service_manager/public/cpp/service.h" | 193 #include "services/service_manager/public/cpp/service.h" |
193 #include "storage/browser/fileapi/external_mount_points.h" | 194 #include "storage/browser/fileapi/external_mount_points.h" |
194 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" | 195 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" |
195 #include "ui/base/l10n/l10n_util.h" | 196 #include "ui/base/l10n/l10n_util.h" |
196 #include "ui/base/resource/resource_bundle.h" | 197 #include "ui/base/resource/resource_bundle.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 #include "extensions/common/constants.h" | 309 #include "extensions/common/constants.h" |
309 #include "extensions/common/extension.h" | 310 #include "extensions/common/extension.h" |
310 #include "extensions/common/extension_set.h" | 311 #include "extensions/common/extension_set.h" |
311 #include "extensions/common/manifest_handlers/background_info.h" | 312 #include "extensions/common/manifest_handlers/background_info.h" |
312 #include "extensions/common/manifest_handlers/shared_module_info.h" | 313 #include "extensions/common/manifest_handlers/shared_module_info.h" |
313 #include "extensions/common/permissions/permissions_data.h" | 314 #include "extensions/common/permissions/permissions_data.h" |
314 #include "extensions/common/permissions/socket_permission.h" | 315 #include "extensions/common/permissions/socket_permission.h" |
315 #include "extensions/common/switches.h" | 316 #include "extensions/common/switches.h" |
316 #endif | 317 #endif |
317 | 318 |
318 #if defined(ENABLE_PLUGINS) | 319 #if BUILDFLAG(ENABLE_PLUGINS) |
319 #include "chrome/browser/plugins/chrome_content_browser_client_plugins_part.h" | 320 #include "chrome/browser/plugins/chrome_content_browser_client_plugins_part.h" |
320 #include "chrome/browser/plugins/flash_download_interception.h" | 321 #include "chrome/browser/plugins/flash_download_interception.h" |
321 #endif | 322 #endif |
322 | 323 |
323 #if BUILDFLAG(ENABLE_SPELLCHECK) | 324 #if BUILDFLAG(ENABLE_SPELLCHECK) |
324 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" | 325 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" |
325 #endif | 326 #endif |
326 | 327 |
327 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) | 328 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) |
328 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h" | 329 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 #endif | 380 #endif |
380 | 381 |
381 #if BUILDFLAG(ENABLE_EXTENSIONS) | 382 #if BUILDFLAG(ENABLE_EXTENSIONS) |
382 using extensions::APIPermission; | 383 using extensions::APIPermission; |
383 using extensions::ChromeContentBrowserClientExtensionsPart; | 384 using extensions::ChromeContentBrowserClientExtensionsPart; |
384 using extensions::Extension; | 385 using extensions::Extension; |
385 using extensions::InfoMap; | 386 using extensions::InfoMap; |
386 using extensions::Manifest; | 387 using extensions::Manifest; |
387 #endif | 388 #endif |
388 | 389 |
389 #if defined(ENABLE_PLUGINS) | 390 #if BUILDFLAG(ENABLE_PLUGINS) |
390 using plugins::ChromeContentBrowserClientPluginsPart; | 391 using plugins::ChromeContentBrowserClientPluginsPart; |
391 #endif | 392 #endif |
392 | 393 |
393 namespace { | 394 namespace { |
394 | 395 |
395 // Cached version of the locale so we can return the locale on the I/O | 396 // Cached version of the locale so we can return the locale on the I/O |
396 // thread. | 397 // thread. |
397 base::LazyInstance<std::string> g_io_thread_application_locale; | 398 base::LazyInstance<std::string> g_io_thread_application_locale; |
398 | 399 |
399 #if defined(ENABLE_PLUGINS) | 400 #if BUILDFLAG(ENABLE_PLUGINS) |
400 // TODO(teravest): Add renderer-side API-specific checking for these APIs so | 401 // TODO(teravest): Add renderer-side API-specific checking for these APIs so |
401 // that blanket permission isn't granted to all dev channel APIs for these. | 402 // that blanket permission isn't granted to all dev channel APIs for these. |
402 // http://crbug.com/386743 | 403 // http://crbug.com/386743 |
403 const char* const kPredefinedAllowedDevChannelOrigins[] = { | 404 const char* const kPredefinedAllowedDevChannelOrigins[] = { |
404 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see crbug.com/383937 | 405 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see crbug.com/383937 |
405 "4EB74897CB187C7633357C2FE832E0AD6A44883A" // see crbug.com/383937 | 406 "4EB74897CB187C7633357C2FE832E0AD6A44883A" // see crbug.com/383937 |
406 }; | 407 }; |
407 | 408 |
408 const char* const kPredefinedAllowedFileHandleOrigins[] = { | 409 const char* const kPredefinedAllowedFileHandleOrigins[] = { |
409 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see crbug.com/234789 | 410 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see crbug.com/234789 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 return; | 635 return; |
635 } | 636 } |
636 | 637 |
637 PopupBlockerTabHelper* popup_helper = | 638 PopupBlockerTabHelper* popup_helper = |
638 PopupBlockerTabHelper::FromWebContents(tab); | 639 PopupBlockerTabHelper::FromWebContents(tab); |
639 if (!popup_helper) | 640 if (!popup_helper) |
640 return; | 641 return; |
641 popup_helper->AddBlockedPopup(params); | 642 popup_helper->AddBlockedPopup(params); |
642 } | 643 } |
643 | 644 |
644 #if defined(ENABLE_PLUGINS) | 645 #if BUILDFLAG(ENABLE_PLUGINS) |
645 void HandleFlashDownloadActionOnUIThread(int render_process_id, | 646 void HandleFlashDownloadActionOnUIThread(int render_process_id, |
646 int render_frame_id, | 647 int render_frame_id, |
647 const GURL& source_url) { | 648 const GURL& source_url) { |
648 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 649 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
649 RenderFrameHost* render_frame_host = | 650 RenderFrameHost* render_frame_host = |
650 RenderFrameHost::FromID(render_process_id, render_frame_id); | 651 RenderFrameHost::FromID(render_process_id, render_frame_id); |
651 if (!render_frame_host) | 652 if (!render_frame_host) |
652 return; | 653 return; |
653 WebContents* web_contents = | 654 WebContents* web_contents = |
654 WebContents::FromRenderFrameHost(render_frame_host); | 655 WebContents::FromRenderFrameHost(render_frame_host); |
655 FlashDownloadInterception::InterceptFlashDownloadNavigation(web_contents, | 656 FlashDownloadInterception::InterceptFlashDownloadNavigation(web_contents, |
656 source_url); | 657 source_url); |
657 } | 658 } |
658 #endif // defined(ENABLE_PLUGINS) | 659 #endif // BUILDFLAG(ENABLE_PLUGINS) |
659 | 660 |
660 // An implementation of the SSLCertReporter interface used by | 661 // An implementation of the SSLCertReporter interface used by |
661 // SSLErrorHandler. Uses the SafeBrowsing UI manager to send invalid | 662 // SSLErrorHandler. Uses the SafeBrowsing UI manager to send invalid |
662 // certificate reports. | 663 // certificate reports. |
663 class SafeBrowsingSSLCertReporter : public SSLCertReporter { | 664 class SafeBrowsingSSLCertReporter : public SSLCertReporter { |
664 public: | 665 public: |
665 explicit SafeBrowsingSSLCertReporter( | 666 explicit SafeBrowsingSSLCertReporter( |
666 const scoped_refptr<safe_browsing::SafeBrowsingUIManager>& | 667 const scoped_refptr<safe_browsing::SafeBrowsingUIManager>& |
667 safe_browsing_ui_manager) | 668 safe_browsing_ui_manager) |
668 : safe_browsing_ui_manager_(safe_browsing_ui_manager) {} | 669 : safe_browsing_ui_manager_(safe_browsing_ui_manager) {} |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 WebContents* GetWebContents(int render_process_id, int render_frame_id) { | 814 WebContents* GetWebContents(int render_process_id, int render_frame_id) { |
814 RenderFrameHost* rfh = | 815 RenderFrameHost* rfh = |
815 RenderFrameHost::FromID(render_process_id, render_frame_id); | 816 RenderFrameHost::FromID(render_process_id, render_frame_id); |
816 return WebContents::FromRenderFrameHost(rfh); | 817 return WebContents::FromRenderFrameHost(rfh); |
817 } | 818 } |
818 | 819 |
819 } // namespace | 820 } // namespace |
820 | 821 |
821 ChromeContentBrowserClient::ChromeContentBrowserClient() | 822 ChromeContentBrowserClient::ChromeContentBrowserClient() |
822 : weak_factory_(this) { | 823 : weak_factory_(this) { |
823 #if defined(ENABLE_PLUGINS) | 824 #if BUILDFLAG(ENABLE_PLUGINS) |
824 for (size_t i = 0; i < arraysize(kPredefinedAllowedDevChannelOrigins); ++i) | 825 for (size_t i = 0; i < arraysize(kPredefinedAllowedDevChannelOrigins); ++i) |
825 allowed_dev_channel_origins_.insert(kPredefinedAllowedDevChannelOrigins[i]); | 826 allowed_dev_channel_origins_.insert(kPredefinedAllowedDevChannelOrigins[i]); |
826 for (size_t i = 0; i < arraysize(kPredefinedAllowedFileHandleOrigins); ++i) | 827 for (size_t i = 0; i < arraysize(kPredefinedAllowedFileHandleOrigins); ++i) |
827 allowed_file_handle_origins_.insert(kPredefinedAllowedFileHandleOrigins[i]); | 828 allowed_file_handle_origins_.insert(kPredefinedAllowedFileHandleOrigins[i]); |
828 for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i) | 829 for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i) |
829 allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]); | 830 allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]); |
830 | 831 |
831 extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart); | 832 extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart); |
832 #endif | 833 #endif |
833 | 834 |
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2349 : APP_LOADED_IN_TAB_SOURCE_APP; | 2350 : APP_LOADED_IN_TAB_SOURCE_APP; |
2350 UMA_HISTOGRAM_ENUMERATION("Extensions.AppLoadedInTab", source, | 2351 UMA_HISTOGRAM_ENUMERATION("Extensions.AppLoadedInTab", source, |
2351 APP_LOADED_IN_TAB_SOURCE_MAX); | 2352 APP_LOADED_IN_TAB_SOURCE_MAX); |
2352 } | 2353 } |
2353 } | 2354 } |
2354 #endif | 2355 #endif |
2355 | 2356 |
2356 HostContentSettingsMap* content_settings = | 2357 HostContentSettingsMap* content_settings = |
2357 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); | 2358 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); |
2358 | 2359 |
2359 #if defined(ENABLE_PLUGINS) | 2360 #if BUILDFLAG(ENABLE_PLUGINS) |
2360 if (FlashDownloadInterception::ShouldStopFlashDownloadAction( | 2361 if (FlashDownloadInterception::ShouldStopFlashDownloadAction( |
2361 content_settings, opener_top_level_frame_url, target_url, | 2362 content_settings, opener_top_level_frame_url, target_url, |
2362 user_gesture)) { | 2363 user_gesture)) { |
2363 BrowserThread::PostTask( | 2364 BrowserThread::PostTask( |
2364 BrowserThread::UI, FROM_HERE, | 2365 BrowserThread::UI, FROM_HERE, |
2365 base::Bind(&HandleFlashDownloadActionOnUIThread, render_process_id, | 2366 base::Bind(&HandleFlashDownloadActionOnUIThread, render_process_id, |
2366 opener_render_frame_id, opener_top_level_frame_url)); | 2367 opener_render_frame_id, opener_top_level_frame_url)); |
2367 return false; | 2368 return false; |
2368 } | 2369 } |
2369 #endif | 2370 #endif |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2681 | 2682 |
2682 base::FilePath ChromeContentBrowserClient::GetShaderDiskCacheDirectory() { | 2683 base::FilePath ChromeContentBrowserClient::GetShaderDiskCacheDirectory() { |
2683 base::FilePath user_data_dir; | 2684 base::FilePath user_data_dir; |
2684 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); | 2685 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
2685 DCHECK(!user_data_dir.empty()); | 2686 DCHECK(!user_data_dir.empty()); |
2686 return user_data_dir.Append(FILE_PATH_LITERAL("ShaderCache")); | 2687 return user_data_dir.Append(FILE_PATH_LITERAL("ShaderCache")); |
2687 } | 2688 } |
2688 | 2689 |
2689 void ChromeContentBrowserClient::DidCreatePpapiPlugin( | 2690 void ChromeContentBrowserClient::DidCreatePpapiPlugin( |
2690 content::BrowserPpapiHost* browser_host) { | 2691 content::BrowserPpapiHost* browser_host) { |
2691 #if defined(ENABLE_PLUGINS) | 2692 #if BUILDFLAG(ENABLE_PLUGINS) |
2692 ChromeContentBrowserClientPluginsPart::DidCreatePpapiPlugin(browser_host); | 2693 ChromeContentBrowserClientPluginsPart::DidCreatePpapiPlugin(browser_host); |
2693 #endif | 2694 #endif |
2694 } | 2695 } |
2695 | 2696 |
2696 content::BrowserPpapiHost* | 2697 content::BrowserPpapiHost* |
2697 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( | 2698 ChromeContentBrowserClient::GetExternalBrowserPpapiHost( |
2698 int plugin_process_id) { | 2699 int plugin_process_id) { |
2699 #if !defined(DISABLE_NACL) | 2700 #if !defined(DISABLE_NACL) |
2700 content::BrowserChildProcessHostIterator iter(PROCESS_TYPE_NACL_LOADER); | 2701 content::BrowserChildProcessHostIterator iter(PROCESS_TYPE_NACL_LOADER); |
2701 while (!iter.Done()) { | 2702 while (!iter.Done()) { |
(...skipping 17 matching lines...) Expand all Loading... |
2719 return views::WindowManagerConnection::Get()->gpu_service(); | 2720 return views::WindowManagerConnection::Get()->gpu_service(); |
2720 #endif | 2721 #endif |
2721 return nullptr; | 2722 return nullptr; |
2722 } | 2723 } |
2723 | 2724 |
2724 bool ChromeContentBrowserClient::AllowPepperSocketAPI( | 2725 bool ChromeContentBrowserClient::AllowPepperSocketAPI( |
2725 content::BrowserContext* browser_context, | 2726 content::BrowserContext* browser_context, |
2726 const GURL& url, | 2727 const GURL& url, |
2727 bool private_api, | 2728 bool private_api, |
2728 const content::SocketPermissionRequest* params) { | 2729 const content::SocketPermissionRequest* params) { |
2729 #if defined(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) | 2730 #if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) |
2730 return ChromeContentBrowserClientPluginsPart::AllowPepperSocketAPI( | 2731 return ChromeContentBrowserClientPluginsPart::AllowPepperSocketAPI( |
2731 browser_context, url, private_api, params, allowed_socket_origins_); | 2732 browser_context, url, private_api, params, allowed_socket_origins_); |
2732 #else | 2733 #else |
2733 return false; | 2734 return false; |
2734 #endif | 2735 #endif |
2735 } | 2736 } |
2736 | 2737 |
2737 bool ChromeContentBrowserClient::IsPepperVpnProviderAPIAllowed( | 2738 bool ChromeContentBrowserClient::IsPepperVpnProviderAPIAllowed( |
2738 content::BrowserContext* browser_context, | 2739 content::BrowserContext* browser_context, |
2739 const GURL& url) { | 2740 const GURL& url) { |
2740 #if defined(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) | 2741 #if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) |
2741 return ChromeContentBrowserClientPluginsPart::IsPepperVpnProviderAPIAllowed( | 2742 return ChromeContentBrowserClientPluginsPart::IsPepperVpnProviderAPIAllowed( |
2742 browser_context, url); | 2743 browser_context, url); |
2743 #else | 2744 #else |
2744 return false; | 2745 return false; |
2745 #endif | 2746 #endif |
2746 } | 2747 } |
2747 | 2748 |
2748 std::unique_ptr<content::VpnServiceProxy> | 2749 std::unique_ptr<content::VpnServiceProxy> |
2749 ChromeContentBrowserClient::GetVpnServiceProxy( | 2750 ChromeContentBrowserClient::GetVpnServiceProxy( |
2750 content::BrowserContext* browser_context) { | 2751 content::BrowserContext* browser_context) { |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3120 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), | 3121 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), |
3121 metric, url); | 3122 metric, url); |
3122 } | 3123 } |
3123 } | 3124 } |
3124 | 3125 |
3125 ScopedVector<content::NavigationThrottle> | 3126 ScopedVector<content::NavigationThrottle> |
3126 ChromeContentBrowserClient::CreateThrottlesForNavigation( | 3127 ChromeContentBrowserClient::CreateThrottlesForNavigation( |
3127 content::NavigationHandle* handle) { | 3128 content::NavigationHandle* handle) { |
3128 ScopedVector<content::NavigationThrottle> throttles; | 3129 ScopedVector<content::NavigationThrottle> throttles; |
3129 | 3130 |
3130 #if defined(ENABLE_PLUGINS) | 3131 #if BUILDFLAG(ENABLE_PLUGINS) |
3131 std::unique_ptr<content::NavigationThrottle> flash_url_throttle = | 3132 std::unique_ptr<content::NavigationThrottle> flash_url_throttle = |
3132 FlashDownloadInterception::MaybeCreateThrottleFor(handle); | 3133 FlashDownloadInterception::MaybeCreateThrottleFor(handle); |
3133 if (flash_url_throttle) | 3134 if (flash_url_throttle) |
3134 throttles.push_back(std::move(flash_url_throttle)); | 3135 throttles.push_back(std::move(flash_url_throttle)); |
3135 #endif | 3136 #endif |
3136 | 3137 |
3137 if (handle->IsInMainFrame()) { | 3138 if (handle->IsInMainFrame()) { |
3138 throttles.push_back( | 3139 throttles.push_back( |
3139 page_load_metrics::MetricsNavigationThrottle::Create(handle)); | 3140 page_load_metrics::MetricsNavigationThrottle::Create(handle)); |
3140 } | 3141 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3212 #endif | 3213 #endif |
3213 } | 3214 } |
3214 | 3215 |
3215 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { | 3216 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { |
3216 return new ChromeTracingDelegate(); | 3217 return new ChromeTracingDelegate(); |
3217 } | 3218 } |
3218 | 3219 |
3219 bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle( | 3220 bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle( |
3220 content::BrowserContext* browser_context, | 3221 content::BrowserContext* browser_context, |
3221 const GURL& url) { | 3222 const GURL& url) { |
3222 #if defined(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) | 3223 #if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) |
3223 return ChromeContentBrowserClientPluginsPart:: | 3224 return ChromeContentBrowserClientPluginsPart:: |
3224 IsPluginAllowedToCallRequestOSFileHandle(browser_context, url, | 3225 IsPluginAllowedToCallRequestOSFileHandle(browser_context, url, |
3225 allowed_file_handle_origins_); | 3226 allowed_file_handle_origins_); |
3226 #else | 3227 #else |
3227 return false; | 3228 return false; |
3228 #endif | 3229 #endif |
3229 } | 3230 } |
3230 | 3231 |
3231 bool ChromeContentBrowserClient::IsPluginAllowedToUseDevChannelAPIs( | 3232 bool ChromeContentBrowserClient::IsPluginAllowedToUseDevChannelAPIs( |
3232 content::BrowserContext* browser_context, | 3233 content::BrowserContext* browser_context, |
3233 const GURL& url) { | 3234 const GURL& url) { |
3234 #if defined(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) | 3235 #if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) |
3235 return ChromeContentBrowserClientPluginsPart:: | 3236 return ChromeContentBrowserClientPluginsPart:: |
3236 IsPluginAllowedToUseDevChannelAPIs(browser_context, url, | 3237 IsPluginAllowedToUseDevChannelAPIs(browser_context, url, |
3237 allowed_dev_channel_origins_); | 3238 allowed_dev_channel_origins_); |
3238 #else | 3239 #else |
3239 return false; | 3240 return false; |
3240 #endif | 3241 #endif |
3241 } | 3242 } |
3242 | 3243 |
3243 void ChromeContentBrowserClient::OverridePageVisibilityState( | 3244 void ChromeContentBrowserClient::OverridePageVisibilityState( |
3244 RenderFrameHost* render_frame_host, | 3245 RenderFrameHost* render_frame_host, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3296 render_frame_host, std::move(source), std::move(request)); | 3297 render_frame_host, std::move(source), std::move(request)); |
3297 #else | 3298 #else |
3298 // Chrome's media remoting implementation depends on the Media Router | 3299 // Chrome's media remoting implementation depends on the Media Router |
3299 // infrastructure to identify remote sinks and provide the user interface for | 3300 // infrastructure to identify remote sinks and provide the user interface for |
3300 // sink selection. In the case where the Media Router is not present, simply | 3301 // sink selection. In the case where the Media Router is not present, simply |
3301 // drop the interface request. This will prevent code paths for media remoting | 3302 // drop the interface request. This will prevent code paths for media remoting |
3302 // in the renderer process from activating. | 3303 // in the renderer process from activating. |
3303 #endif | 3304 #endif |
3304 } | 3305 } |
3305 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) | 3306 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) |
OLD | NEW |