Chromium Embedded Framework (CEF)  130.1.2+g48f3ef6+chromium-130.0.6723.44
cef_scheme.h File Reference

Classes

class  CefSchemeRegistrar
 Class that manages custom scheme registrations. More...
 
class  CefSchemeHandlerFactory
 Class that creates CefResourceHandler instances for handling scheme requests. More...
 

Functions

bool CefRegisterSchemeHandlerFactory (const CefString &scheme_name, const CefString &domain_name, CefRefPtr< CefSchemeHandlerFactory > factory)
 Register a scheme handler factory with the global request context. More...
 
bool CefClearSchemeHandlerFactories ()
 Clear all scheme handler factories registered with the global request context. More...
 

Function Documentation

◆ CefClearSchemeHandlerFactories()

bool CefClearSchemeHandlerFactories ( )

Clear all scheme handler factories registered with the global request context.

Returns false on error. This function may be called on any thread in the browser process. Using this function is equivalent to calling CefRequestContext::GetGlobalContext()->ClearSchemeHandlerFactories().

◆ CefRegisterSchemeHandlerFactory()

bool CefRegisterSchemeHandlerFactory ( const CefString scheme_name,
const CefString domain_name,
CefRefPtr< CefSchemeHandlerFactory factory 
)

Register a scheme handler factory with the global request context.

An empty |domain_name| value for a standard scheme will cause the factory to match all domain names. The |domain_name| value will be ignored for non-standard schemes. If |scheme_name| is a built-in scheme and no handler is returned by |factory| then the built-in scheme handler factory will be called. If |scheme_name| is a custom scheme then you must also implement the CefApp::OnRegisterCustomSchemes() method in all processes. This function may be called multiple times to change or remove the factory that matches the specified |scheme_name| and optional |domain_name|. Returns false if an error occurs. This function may be called on any thread in the browser process. Using this function is equivalent to calling CefRequestContext::GetGlobalContext()->RegisterSchemeHandlerFactory().