"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "shell/browser/electron_browser_client.cc" between
electron-11.4.1.tar.gz and electron-11.4.2.tar.gz

About: Electron is a framework for creating native cross platform applications with web technologies like JavaScript, HTML, and CSS.

electron_browser_client.cc  (electron-11.4.1):electron_browser_client.cc  (electron-11.4.2)
skipping to change at line 1387 skipping to change at line 1387
}; };
} // namespace } // namespace
#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) #endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
void ElectronBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories( void ElectronBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories(
int render_process_id, int render_process_id,
int render_frame_id, int render_frame_id,
NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories, NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories,
NonNetworkURLLoaderFactoryMap* factories) { NonNetworkURLLoaderFactoryMap* factories) {
content::RenderFrameHost* frame_host = auto* render_process_host =
content::RenderFrameHost::FromID(render_process_id, render_frame_id); content::RenderProcessHost::FromID(render_process_id);
content::WebContents* web_contents = DCHECK(render_process_host);
content::WebContents::FromRenderFrameHost(frame_host); if (!render_process_host || !render_process_host->GetBrowserContext())
return;
ProtocolRegistry::FromBrowserContext(render_process_host->GetBrowserContext())
->RegisterURLLoaderFactories(URLLoaderFactoryType::kDocumentSubResource,
factories);
if (web_contents) {
ProtocolRegistry::FromBrowserContext(web_contents->GetBrowserContext())
->RegisterURLLoaderFactories(URLLoaderFactoryType::kDocumentSubResource,
factories);
}
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
auto factory = extensions::CreateExtensionURLLoaderFactory(render_process_id, auto factory = extensions::CreateExtensionURLLoaderFactory(render_process_id,
render_frame_id); render_frame_id);
if (factory) if (factory)
factories->emplace(extensions::kExtensionScheme, std::move(factory)); factories->emplace(extensions::kExtensionScheme, std::move(factory));
content::RenderFrameHost* frame_host =
content::RenderFrameHost::FromID(render_process_id, render_frame_id);
content::WebContents* web_contents =
content::WebContents::FromRenderFrameHost(frame_host);
if (!web_contents) if (!web_contents)
return; return;
extensions::ElectronExtensionWebContentsObserver* web_observer = extensions::ElectronExtensionWebContentsObserver* web_observer =
extensions::ElectronExtensionWebContentsObserver::FromWebContents( extensions::ElectronExtensionWebContentsObserver::FromWebContents(
web_contents); web_contents);
// There is nothing to do if no ElectronExtensionWebContentsObserver is // There is nothing to do if no ElectronExtensionWebContentsObserver is
// attached to the |web_contents|. // attached to the |web_contents|.
if (!web_observer) if (!web_observer)
 End of changes. 3 change blocks. 
9 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)