UCefView
Loading...
Searching...
No Matches
FSlateCefSettings

Represents the settings for a single CefView instance. Configure this struct to control CEF behavior, resource mapping, localization, logging, and debugging. More...

#include <SlateCefSettings.h>

Public Attributes

FName BridgeObjectName = TEXT("UCefViewBridge")
 The name of the bridge object injected into all browser frames. This object enables communication between JavaScript in web content and native C++ code. It is accessible in JavaScript as a property of the window object (e.g., window.bridgeObject). Default: "UCefViewBridge".
 
FName BuiltinSchemeName = TEXT("UCefView")
 The name of the built-in custom URL scheme used for resource mapping and internal communication. Default: "UCefView".
 
FString UserAgent
 The user agent string to be used by the browser. If empty, the default CEF user agent will be used.
 
TArray< FArchiveFileResourceMappingArchiveFileResourceMapping
 List of archive file resource mappings (only .zip format is supported). Each mapping specifies a virtual URL and a corresponding archive file path (relative to the Game Dir). Resources inside the archive can be accessed via the mapped URL.
 
TArray< FLocalFolderResourceMappingLocalFolderResroucesMapping
 List of local folder resource mappings. Each mapping specifies a virtual URL and a corresponding folder path (relative to the Game Content Dir). Resources inside the folder can be accessed via the mapped URL.
 
FColor BackgroundColor = FColor::White
 The background color used for the browser view. This color is used when no web content is loaded or as the default background. Default: FColor::White.
 
FString Locale
 The locale to use for browser UI and web content. If empty, the default locale "en-US" is used. On Linux, this value is ignored and locale is determined from environment variables (LANGUAGE, LC_ALL, LC_MESSAGES, LANG). Can also be set using the "lang" command-line switch.
 
TArray< FString > AcceptLanguageList
 Comma-delimited, ordered list of language codes (without whitespace) to use in the "Accept-Language" HTTP header. Determines the preferred languages for web content. Example: ["en-US", "fr", "de"].
 
bool PersistSessionCookies = true
 Whether to persist session cookies across browser restarts. If true, session cookies are saved and restored; if false, they are cleared on shutdown. Default: true.
 
bool PersistUserPreferences = true
 Whether to persist user preferences (such as autofill data, settings, etc.). If true, preferences are saved and restored; if false, they are reset on shutdown. Default: true.
 
ESlateCefLogLevel LogLevel = ESlateCefLogLevel::Default
 The log level for CEF logging output. Controls the verbosity of log messages written by CEF. Default: ESlateCefLogLevel::Default.
 
int32 RemoteDebuggingport = 0
 The port number to enable remote debugging with Chrome DevTools. If set to a value greater than zero, remote debugging is enabled and you can connect using Chrome/Edge. Default: 0 (disabled)
 
bool DisableCommandLineArgsPassthrough = false
 Whether to disable passing the application command line arguments to CEF. If true, only explicitly specified command line arguments are passed to CEF. Default: false.
 
bool DisableSandbox = true
 Whether to disable the CEF sandbox. Only applicable on macOS; ignored on other platforms. Disabling the sandbox may be required for certain integrations or debugging. Default: true.
 
TMap< FString, FString > CommandLineArgs
 Additional command line arguments to be passed to CEF. Each entry maps a switch name to its value (e.g., {"remote-allow-origins", "*"}). These arguments allow fine-grained control over CEF behavior.
 

Detailed Description

Represents the settings for a single CefView instance. Configure this struct to control CEF behavior, resource mapping, localization, logging, and debugging.

Member Data Documentation

◆ AcceptLanguageList

TArray<FString> FSlateCefSettings::AcceptLanguageList

Comma-delimited, ordered list of language codes (without whitespace) to use in the "Accept-Language" HTTP header. Determines the preferred languages for web content. Example: ["en-US", "fr", "de"].

◆ ArchiveFileResourceMapping

TArray<FArchiveFileResourceMapping> FSlateCefSettings::ArchiveFileResourceMapping

List of archive file resource mappings (only .zip format is supported). Each mapping specifies a virtual URL and a corresponding archive file path (relative to the Game Dir). Resources inside the archive can be accessed via the mapped URL.

◆ BackgroundColor

FColor FSlateCefSettings::BackgroundColor = FColor::White

The background color used for the browser view. This color is used when no web content is loaded or as the default background. Default: FColor::White.

◆ BridgeObjectName

FName FSlateCefSettings::BridgeObjectName = TEXT("UCefViewBridge")

The name of the bridge object injected into all browser frames. This object enables communication between JavaScript in web content and native C++ code. It is accessible in JavaScript as a property of the window object (e.g., window.bridgeObject). Default: "UCefViewBridge".

◆ BuiltinSchemeName

FName FSlateCefSettings::BuiltinSchemeName = TEXT("UCefView")

The name of the built-in custom URL scheme used for resource mapping and internal communication. Default: "UCefView".

◆ CommandLineArgs

TMap<FString, FString> FSlateCefSettings::CommandLineArgs
Initial value:
=
{
{ TEXT("remote-allow-origins"), TEXT("*") },
}

Additional command line arguments to be passed to CEF. Each entry maps a switch name to its value (e.g., {"remote-allow-origins", "*"}). These arguments allow fine-grained control over CEF behavior.

◆ DisableCommandLineArgsPassthrough

bool FSlateCefSettings::DisableCommandLineArgsPassthrough = false

Whether to disable passing the application command line arguments to CEF. If true, only explicitly specified command line arguments are passed to CEF. Default: false.

◆ DisableSandbox

bool FSlateCefSettings::DisableSandbox = true

Whether to disable the CEF sandbox. Only applicable on macOS; ignored on other platforms. Disabling the sandbox may be required for certain integrations or debugging. Default: true.

◆ Locale

FString FSlateCefSettings::Locale

The locale to use for browser UI and web content. If empty, the default locale "en-US" is used. On Linux, this value is ignored and locale is determined from environment variables (LANGUAGE, LC_ALL, LC_MESSAGES, LANG). Can also be set using the "lang" command-line switch.

◆ LocalFolderResroucesMapping

TArray<FLocalFolderResourceMapping> FSlateCefSettings::LocalFolderResroucesMapping

List of local folder resource mappings. Each mapping specifies a virtual URL and a corresponding folder path (relative to the Game Content Dir). Resources inside the folder can be accessed via the mapped URL.

◆ LogLevel

ESlateCefLogLevel FSlateCefSettings::LogLevel = ESlateCefLogLevel::Default

The log level for CEF logging output. Controls the verbosity of log messages written by CEF. Default: ESlateCefLogLevel::Default.

◆ PersistSessionCookies

bool FSlateCefSettings::PersistSessionCookies = true

Whether to persist session cookies across browser restarts. If true, session cookies are saved and restored; if false, they are cleared on shutdown. Default: true.

◆ PersistUserPreferences

bool FSlateCefSettings::PersistUserPreferences = true

Whether to persist user preferences (such as autofill data, settings, etc.). If true, preferences are saved and restored; if false, they are reset on shutdown. Default: true.

◆ RemoteDebuggingport

int32 FSlateCefSettings::RemoteDebuggingport = 0

The port number to enable remote debugging with Chrome DevTools. If set to a value greater than zero, remote debugging is enabled and you can connect using Chrome/Edge. Default: 0 (disabled)

◆ UserAgent

FString FSlateCefSettings::UserAgent

The user agent string to be used by the browser. If empty, the default CEF user agent will be used.