Click or drag to resize
CefSettings Class
Version 51.0.0
Initialization settings. Many of these and other settings can also configured using command-line switches.
Inheritance Hierarchy
SystemObject
  CefSharpCefSettings

Namespace: CefSharp
Assembly: CefSharp.Core (in CefSharp.Core.dll) Version: 51.0.0.0
Syntax
public class CefSettings : IDisposable

The CefSettings type exposes the following members.

Constructors
  NameDescription
Public methodCefSettings
Default Constructor
Top
Properties
  NameDescription
Public propertyAcceptLanguageList
Comma delimited ordered list of language codes without any whitespace that will be used in the "Accept-Language" HTTP header. May be set globally using the CefSettings.AcceptLanguageList value. If both values are empty then "en-US,en" will be used.
Public propertyBrowserSubprocessPath
The path to a separate executable that will be launched for sub-processes. By default the browser process executable is used. See the comments on Cef.ExecuteProcess() for details. Also configurable using the "browser-subprocess-path" command-line switch. Default is CefSharp.BrowserSubprocess.exe
Public propertyCachePath
The location where cache data will be stored on disk. If empty then browsers will be created in "incognito mode" where in-memory caches are used for storage and no data is persisted to disk. HTML5 databases such as localStorage will only persist across sessions if a cache path is specified. Can be overridden for individual CefRequestContext instances via the RequestContextSettings.CachePath value.
Public propertyCefCommandLineArgs
Add custom command line argumens to this collection, they will be added in OnBeforeCommandLineProcessing.
Public propertyCefCustomSchemes
Add Customs schemes to this collection
Public propertyCommandLineArgsDisabled
Set to true to disable configuration of browser process features using standard CEF and Chromium command-line arguments. Configuration can still be specified using CEF data structures or by adding to CefCommandLineArgs
Public propertyExtensions
Add CefExtensions to be registered
Public propertyFocusedNodeChangedEnabled
If true a message will be sent from the render subprocess to the browser when a DOM node (or no node) gets focus. The default is false.
Public propertyIgnoreCertificateErrors
Set to true in order to completely ignore SSL certificate errors. This is NOT recommended.
Public propertyJavascriptFlags
Custom flags that will be used when initializing the V8 JavaScript engine. The consequences of using custom flags may not be well tested. Also configurable using the "js-flags" command-line switch.
Public propertyLocale
The locale string that will be passed to WebKit. If empty the default locale of "en-US" will be used. Also configurable using the "lang" command-line switch.
Public propertyLocalesDirPath
The fully qualified path for the locales directory. If this value is empty the locales directory must be located in the module directory. Also configurable using the "locales-dir-path" command-line switch.
Public propertyLogFile
The directory and file name to use for the debug log. If empty a default log file name and location will be used. On Windows and Linux a "debug.log" file will be written in the main executable directory. Also configurable using the"log-file" command-line switch.
Public propertyLogSeverity
The log severity. Only messages of this severity level or higher will be logged. Also configurable using the "log-severity" command-line switch with a value of "verbose", "info", "warning", "error", "error-report" or "disable".
Public propertyMultiThreadedMessageLoop
thread. If false than the CefDoMessageLoopWork() function must be called from your application message loop. This option is only supported on Windows. The default value is true
Public propertyPackLoadingDisabled
Set to true to disable loading of pack files for resources and locales. A resource bundle handler must be provided for the browser and render processes via CefApp::GetResourceBundleHandler() if loading of pack files is disabled. Also configurable using the "disable-pack-loading" command- line switch.
Public propertyPersistSessionCookies
To persist session cookies (cookies without an expiry date or validity interval) by default when using the global cookie manager set this value to true. Session cookies are generally intended to be transient and most Web browsers do not persist them. A CachePath value must also be specified to enable this feature. Also configurable using the "persist-session-cookies" command-line switch. Can be overridden for individual RequestContext instances via the RequestContextSettings.PersistSessionCookies value.
Public propertyProductVersion
Value that will be inserted as the product portion of the default User-Agent string. If empty the Chromium product version will be used. If |userAgent| is specified this value will be ignored. Also configurable using the "product-version" command-line switch.
Public propertyRemoteDebuggingPort
Set to a value between 1024 and 65535 to enable remote debugging on the specified port. For example, if 8080 is specified the remote debugging URL will be http://localhost:8080. CEF can be remotely debugged from any CEF or Chrome browser window. Also configurable using the "remote-debugging-port" command-line switch.
Public propertyResourcesDirPath
The fully qualified path for the resources directory. If this value is empty the cef.pak and/or devtools_resources.pak files must be located in the module directory. Also configurable using the "resources-dir-path" command-line switch.
Public propertyUncaughtExceptionStackSize
The number of stack trace frames to capture for uncaught exceptions. Specify a positive value to enable the CefRenderProcessHandler:: OnUncaughtException() callback. Specify 0 (default value) and OnUncaughtException() will not be called. Also configurable using the "uncaught-exception-stack-size" command-line switch.
Public propertyUserAgent
Value that will be returned as the User-Agent HTTP header. If empty the default User-Agent string will be used. Also configurable using the "user-agent" command-line switch.
Public propertyUserDataPath
The location where user data such as spell checking dictionary files will be stored on disk. If empty then the default platform-specific user data directory will be used ("~/.cef_user_data" directory on Linux, "~/Library/Application Support/CEF/User Data" directory on Mac OS X, "Local Settings\Application Data\CEF\User Data" directory under the user profile directory on Windows).
Public propertyWindowlessRenderingEnabled
Set to true (1) to enable windowless (off-screen) rendering support. Do not enable this value if the application does not use windowless rendering as it may reduce rendering performance on some systems.
Top
Methods
  NameDescription
Public methodDispose
Releases all resources used by the CefSettings
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the CefSettings and optionally releases the managed resources
Public methodEnableInternalPdfViewerOffScreen
Disable Surfaces so internal PDF viewer works for OSR https://bitbucket.org/chromiumembedded/cef/issues/1689
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize (Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRegisterExtension
Registers an extension with the provided settings.
Public methodRegisterScheme
Registers a custom scheme using the provided settings.
Public methodSetOffScreenRenderingBestPerformanceArgs
Set command line arguments for best OSR (Offscreen and WPF) Rendering performance This will disable WebGL, look at the source to determine which flags best suite your requirements.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also