UCefView
Loading...
Searching...
No Matches
UCefContext

Represents the CEF context. This class provides access to CEF functionality within Unreal Engine. More...

#include <CefContext.h>

Public Member Functions

virtual void Initialize (FSubsystemCollectionBase &Collection) override
 Called when the engine is initialized.
 
virtual void Deinitialize () override
 Called when the engine is deinitialized.
 
bool InitializeCef ()
 Initializes CEF.
 
void ShutdownCef ()
 Shuts down CEF.
 
bool bIsCefInitialized () const
 Checks if CEF is initialized.
 
void AddLocalFolderResource (const FString &InPath, const FString &InUrl, int32 InPriority=0)
 Adds a url mapping item with local web resource directory. This works for all QCefView instances created subsequently.
 
void AddArchiveFileResource (const FString &pInPathath, const FString &InUrl, const FString &InPassword, int32 InPriority=0)
 Adds a url mapping item with local archive (.zip) file which contains the web resource. This works for all QCefView instances created subsequently.
 
bool AddCookie (const FString &InName, const FString &InValue, const FString &InDomain, const FString &InUrl)
 Adds a cookie to the CEF context, this cookie is accessible from all browsers created with this context.
 
bool DeleteAllCookies ()
 Deletes all cookies from the CEF context.
 
bool AddCrossOriginWhitelistEntry (const FString &InSourceOrigin, const FString &InTargetSchema, const FString &InTargetDomain, bool InAllowTargetSubdomains)
 Adds an entry to the cross-origin access whitelist. For details please refer to: https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23.
 
bool RemoveCrossOriginWhitelistEntry (const FString &InSourceOrigin, const FString &InTargetSchema, const FString &InTargetDomain, bool InAllowTargetSubdomains)
 Removes an entry from the cross-origin access whitelist. For details please refer to: https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12.
 
bool ClearCrossOriginWhitelistEntry ()
 Removes all entries from the cross-origin access whitelist.
 

Public Attributes

UCefSettingsSettings = GetMutableDefault<UCefSettings>()
 The settings for the CEF context.
 

Detailed Description

Represents the CEF context. This class provides access to CEF functionality within Unreal Engine.

Member Function Documentation

◆ AddArchiveFileResource()

void UCefContext::AddArchiveFileResource ( const FString & pInPathath,
const FString & InUrl,
const FString & InPassword,
int32 InPriority = 0 )

Adds a url mapping item with local archive (.zip) file which contains the web resource. This works for all QCefView instances created subsequently.

Parameters
pInPathathThe path to the local archive file.
InUrlThe url to be mapped to.
InPasswordThe password of the archive.
InPriorityThe priority.

◆ AddCookie()

bool UCefContext::AddCookie ( const FString & InName,
const FString & InValue,
const FString & InDomain,
const FString & InUrl )

Adds a cookie to the CEF context, this cookie is accessible from all browsers created with this context.

Parameters
InNameThe cookie item name.
InValueThe cookie item value.
InDomainThe applicable domain name.
InUrlThe applicable url.
Returns
True on success; otherwise false.

◆ AddCrossOriginWhitelistEntry()

bool UCefContext::AddCrossOriginWhitelistEntry ( const FString & InSourceOrigin,
const FString & InTargetSchema,
const FString & InTargetDomain,
bool InAllowTargetSubdomains )

Adds an entry to the cross-origin access whitelist. For details please refer to: https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23.

Parameters
InSourceOriginThe source origin.
InTargetSchemaThe target schema.
InTargetDomainThe target domain.
InAllowTargetSubdomainsWhether to allow subdomain or not.
Returns
True on success; otherwise false.

◆ AddLocalFolderResource()

void UCefContext::AddLocalFolderResource ( const FString & InPath,
const FString & InUrl,
int32 InPriority = 0 )

Adds a url mapping item with local web resource directory. This works for all QCefView instances created subsequently.

Parameters
InPathThe path to the local resource directory.
InUrlThe url to be mapped to.
InPriorityThe priority.

◆ bIsCefInitialized()

bool UCefContext::bIsCefInitialized ( ) const

Checks if CEF is initialized.

Returns
True if CEF is initialized; otherwise, false.

◆ ClearCrossOriginWhitelistEntry()

bool UCefContext::ClearCrossOriginWhitelistEntry ( )

Removes all entries from the cross-origin access whitelist.

◆ Deinitialize()

virtual void UCefContext::Deinitialize ( )
overridevirtual

Called when the engine is deinitialized.

◆ DeleteAllCookies()

bool UCefContext::DeleteAllCookies ( )

Deletes all cookies from the CEF context.

Returns
True on success; otherwise false.

◆ Initialize()

virtual void UCefContext::Initialize ( FSubsystemCollectionBase & Collection)
overridevirtual

Called when the engine is initialized.

◆ InitializeCef()

bool UCefContext::InitializeCef ( )

Initializes CEF.

Returns
True if CEF was initialized successfully; otherwise, false.

◆ RemoveCrossOriginWhitelistEntry()

bool UCefContext::RemoveCrossOriginWhitelistEntry ( const FString & InSourceOrigin,
const FString & InTargetSchema,
const FString & InTargetDomain,
bool InAllowTargetSubdomains )

Removes an entry from the cross-origin access whitelist. For details please refer to: https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12.

Parameters
InSourceOriginThe source origin.
InTargetSchemaThe target schema.
InTargetDomainThe target domain.
InAllowTargetSubdomainsWhether to allow subdomain or not.
Returns
True on success; otherwise false.

◆ ShutdownCef()

void UCefContext::ShutdownCef ( )

Shuts down CEF.

Member Data Documentation

◆ Settings

UCefSettings* UCefContext::Settings = GetMutableDefault<UCefSettings>()

The settings for the CEF context.