diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index b0834f25f..d087837d1 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -102,6 +102,7 @@ #include "extensions/browser/extensions_browser_client.h" #include "extensions/browser/guest_view/extensions_guest_view_message_filter.h" #include "extensions/browser/guest_view/web_view/web_view_guest.h" +#include "extensions/browser/url_loader_factory_manager.h" #include "extensions/common/constants.h" #include "extensions/common/switches.h" #include "mojo/public/cpp/bindings/remote.h" @@ -626,6 +627,17 @@ bool CefContentBrowserClient::DoesSiteRequireDedicatedProcess( return extension != nullptr; } +void CefContentBrowserClient::OverrideURLLoaderFactoryParams( + content::BrowserContext* browser_context, + const url::Origin& origin, + bool is_for_isolated_world, + network::mojom::URLLoaderFactoryParams* factory_params) { + if (extensions::ExtensionsEnabled()) { + extensions::URLLoaderFactoryManager::OverrideURLLoaderFactoryParams( + browser_context, origin, is_for_isolated_world, factory_params); + } +} + void CefContentBrowserClient::GetAdditionalWebUISchemes( std::vector* additional_schemes) { // Any schemes listed here are treated as WebUI schemes but do not get WebUI diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index 2c23c31a0..40cfea20e 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -46,6 +46,11 @@ class CefContentBrowserClient : public content::ContentBrowserClient { const GURL& effective_url) override; bool DoesSiteRequireDedicatedProcess(content::BrowserContext* browser_context, const GURL& effective_site_url) override; + void OverrideURLLoaderFactoryParams( + content::BrowserContext* browser_context, + const url::Origin& origin, + bool is_for_isolated_world, + network::mojom::URLLoaderFactoryParams* factory_params) override; void GetAdditionalWebUISchemes( std::vector* additional_schemes) override; void GetAdditionalViewSourceSchemes(