UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FWebBrowserSingleton Class Reference

#include <WebBrowserSingleton.h>

+ Inheritance diagram for FWebBrowserSingleton:

Public Member Functions

 FWebBrowserSingleton (const FWebBrowserInitSettings &WebBrowserInitSettings)
 
virtual ~FWebBrowserSingleton ()
 
virtual bool IsShuttingDown () const override
 
virtual FString ApplicationCacheDir () const override
 
virtual TSharedRef< IWebBrowserWindowFactoryGetWebBrowserWindowFactory () const override
 
TSharedPtr< IWebBrowserWindowCreateBrowserWindow (TSharedPtr< FCEFWebBrowserWindow > &BrowserWindowParent, TSharedPtr< FWebBrowserWindowInfo > &BrowserWindowInfo) override
 
TSharedPtr< IWebBrowserWindowCreateBrowserWindow (const FCreateBrowserWindowSettings &Settings) override
 
virtual TSharedPtr< IWebBrowserCookieManagerGetCookieManager () const override
 
virtual TSharedPtr< IWebBrowserCookieManagerGetCookieManager (TOptional< FString > ContextId) const override
 
virtual bool RegisterContext (const FBrowserContextSettings &Settings) override
 
virtual bool UnregisterContext (const FString &ContextId) override
 
virtual bool RegisterSchemeHandlerFactory (FString Scheme, FString Domain, IWebBrowserSchemeHandlerFactory *WebBrowserSchemeHandlerFactory) override
 
virtual bool UnregisterSchemeHandlerFactory (IWebBrowserSchemeHandlerFactory *WebBrowserSchemeHandlerFactory) override
 
virtual bool IsDevToolsShortcutEnabled () override
 
virtual void SetDevToolsShortcutEnabled (bool Value) override
 
virtual void SetJSBindingToLoweringEnabled (bool bEnabled) override
 
virtual void ClearOldCacheFolders (const FString &CachePathRoot, const FString &CachePrefix) override
 
virtual void SetDefaultMaterial (UMaterialInterface *InDefaultMaterial) override
 
virtual void SetDefaultTranslucentMaterial (UMaterialInterface *InDefaultMaterial) override
 
virtual UMaterialInterfaceGetDefaultMaterial () override
 
virtual UMaterialInterfaceGetDefaultTranslucentMaterial () override
 
virtual bool Tick (float DeltaTime) override
 
- Public Member Functions inherited from IWebBrowserSingleton
virtual ~IWebBrowserSingleton ()
 
- Public Member Functions inherited from FTSTickerObjectBase
 UE_NONCOPYABLE (FTSTickerObjectBase)
 
CORE_API FTSTickerObjectBase (float InDelay=0.0f, FTSTicker &Ticker=FTSTicker::GetCoreTicker())
 
virtual CORE_API ~FTSTickerObjectBase ()
 

Static Public Member Functions

static FString GetCurrentLocaleCode ()
 

Detailed Description

Implementation of singleton class that takes care of general web browser tasks

Constructor & Destructor Documentation

◆ FWebBrowserSingleton()

FWebBrowserSingleton::FWebBrowserSingleton ( const FWebBrowserInitSettings WebBrowserInitSettings)

Constructor.

◆ ~FWebBrowserSingleton()

FWebBrowserSingleton::~FWebBrowserSingleton ( )
virtual

Virtual destructor.

Member Function Documentation

◆ ApplicationCacheDir()

FString FWebBrowserSingleton::ApplicationCacheDir ( ) const
overridevirtual

Implements IWebBrowserSingleton.

◆ ClearOldCacheFolders()

void FWebBrowserSingleton::ClearOldCacheFolders ( const FString &  CachePathRoot,
const FString &  CachePrefix 
)
overridevirtual

Delete old/unused web cache paths. Some Web implementations (i.e CEF) use version specific cache folders, this call lets you schedule a deletion of any now unused folders. Calling this may resulting in async disk I/O.

Parameters
CachePathRootthe base path used for saving the webcache folder
CachePrefixthe filename prefix we use for the cache folder (i.e "webcache")

Implements IWebBrowserSingleton.

◆ CreateBrowserWindow() [1/2]

TSharedPtr< IWebBrowserWindow > FWebBrowserSingleton::CreateBrowserWindow ( const FCreateBrowserWindowSettings Settings)
overridevirtual

Create a new web browser window

Parameters
SettingsStruct containing browser window settings
Returns
New Web Browser Window Interface (may be null if not supported)

Implements IWebBrowserSingleton.

◆ CreateBrowserWindow() [2/2]

TSharedPtr< IWebBrowserWindow > FWebBrowserSingleton::CreateBrowserWindow ( TSharedPtr< FCEFWebBrowserWindow > &  BrowserWindowParent,
TSharedPtr< FWebBrowserWindowInfo > &  BrowserWindowInfo 
)
overridevirtual

Create a new web browser window

Parameters
BrowserWindowParentThe parent browser window
BrowserWindowInfoInfo for setting up the new browser window
Returns
New Web Browser Window Interface (may be null if not supported)

Implements IWebBrowserSingleton.

◆ GetCookieManager() [1/2]

virtual TSharedPtr< IWebBrowserCookieManager > FWebBrowserSingleton::GetCookieManager ( ) const
inlineoverridevirtual

Implements IWebBrowserSingleton.

◆ GetCookieManager() [2/2]

TSharedPtr< IWebBrowserCookieManager > FWebBrowserSingleton::GetCookieManager ( TOptional< FString >  ContextId) const
overridevirtual

Implements IWebBrowserSingleton.

◆ GetCurrentLocaleCode()

FString FWebBrowserSingleton::GetCurrentLocaleCode ( )
static

Gets the Current Locale Code in the format CEF expects

Returns
Locale code as either "xx" or "xx-YY"

◆ GetDefaultMaterial()

virtual UMaterialInterface * FWebBrowserSingleton::GetDefaultMaterial ( )
inlineoverridevirtual

Get a reference to UWebBrowser's default material

Implements IWebBrowserSingleton.

◆ GetDefaultTranslucentMaterial()

virtual UMaterialInterface * FWebBrowserSingleton::GetDefaultTranslucentMaterial ( )
inlineoverridevirtual

Get a reference to UWebBrowser's translucent material

Implements IWebBrowserSingleton.

◆ GetWebBrowserWindowFactory()

TSharedRef< IWebBrowserWindowFactory > FWebBrowserSingleton::GetWebBrowserWindowFactory ( ) const
overridevirtual
Returns
A factory object that can be used to construct additional WebBrowserWindows on demand.

Implements IWebBrowserSingleton.

◆ IsDevToolsShortcutEnabled()

virtual bool FWebBrowserSingleton::IsDevToolsShortcutEnabled ( )
inlineoverridevirtual

Returns whether the CTRL/CMD-SHIFT-I shortcut to show the Chromium Dev tools window is enabled.

The relevant handlers for spawning new browser windows have to be set up correctly in addition to this flag being true before anything is shown.

Returns
a boolean value indicating whether the keyboard shortcut is enabled or not.

Implements IWebBrowserSingleton.

◆ IsShuttingDown()

bool FWebBrowserSingleton::IsShuttingDown ( ) const
overridevirtual

Indicates whether the browser engine is in the shutdown phase.

Implements IWebBrowserSingleton.

◆ RegisterContext()

bool FWebBrowserSingleton::RegisterContext ( const FBrowserContextSettings Settings)
overridevirtual

Implements IWebBrowserSingleton.

◆ RegisterSchemeHandlerFactory()

bool FWebBrowserSingleton::RegisterSchemeHandlerFactory ( FString  Scheme,
FString  Domain,
IWebBrowserSchemeHandlerFactory WebBrowserSchemeHandlerFactory 
)
overridevirtual

Registers a custom scheme handler factory, for a given scheme and domain. The domain is ignored if the scheme is not a browser built in scheme and all requests will go through this factory.

Parameters
SchemeThe scheme name to handle.
DomainThe domain name to handle.
WebBrowserSchemeHandlerFactoryThe factory implementation for creating request handlers for this scheme.

Implements IWebBrowserSingleton.

◆ SetDefaultMaterial()

virtual void FWebBrowserSingleton::SetDefaultMaterial ( UMaterialInterface InDefaultMaterial)
inlineoverridevirtual

Set a reference to UWebBrowser's default material

Implements IWebBrowserSingleton.

◆ SetDefaultTranslucentMaterial()

virtual void FWebBrowserSingleton::SetDefaultTranslucentMaterial ( UMaterialInterface InDefaultMaterial)
inlineoverridevirtual

Set a reference to UWebBrowser's translucent material

Implements IWebBrowserSingleton.

◆ SetDevToolsShortcutEnabled()

virtual void FWebBrowserSingleton::SetDevToolsShortcutEnabled ( bool  Value)
inlineoverridevirtual

Enable or disable CTRL/CMD-SHIFT-I shortcut to show the Chromium Dev tools window. The value defaults to true on debug builds, otherwise false.

The relevant handlers for spawning new browser windows have to be set up correctly in addition to this flag being true before anything is shown.

Parameters
Valuea boolean value to enable or disable the keyboard shortcut.

Implements IWebBrowserSingleton.

◆ SetJSBindingToLoweringEnabled()

virtual void FWebBrowserSingleton::SetJSBindingToLoweringEnabled ( bool  bEnabled)
inlineoverridevirtual

Enable or disable to-lowering of JavaScript object member bindings.

Due to how JavaScript to UObject bridges require the use of FNames for building up the JS API objects, it is possible for case-sensitivity issues to develop if an FName has been previously created with differing case to your function or property names. To-lowering the member names allows a guaranteed casing for the web page's JS to reference.

Default behavior is enabled, so that all JS side objects have only lowercase members.

Parameters
bEnableda boolean value to enable or disable the to-lowering.

Implements IWebBrowserSingleton.

◆ Tick()

bool FWebBrowserSingleton::Tick ( float  DeltaTime)
overridevirtual

Pure virtual that must be overloaded by the inheriting class.

Parameters
DeltaTimetime passed since the last call.
Returns
true if should continue ticking

Implements FTSTickerObjectBase.

◆ UnregisterContext()

bool FWebBrowserSingleton::UnregisterContext ( const FString &  ContextId)
overridevirtual

Implements IWebBrowserSingleton.

◆ UnregisterSchemeHandlerFactory()

bool FWebBrowserSingleton::UnregisterSchemeHandlerFactory ( IWebBrowserSchemeHandlerFactory WebBrowserSchemeHandlerFactory)
overridevirtual

Unregister a custom scheme handler factory. The factory may still be used by existing open browser windows, but will no longer be provided for new ones.

Parameters
WebBrowserSchemeHandlerFactoryThe factory implementation to remove.

Implements IWebBrowserSingleton.


The documentation for this class was generated from the following files: