"CefSharp.Core"
Creates a detailed expection string from a provided Cef V8 exception.
The exception which will be used as base for the message
Assigns the provided cef_string_t object from the given .NET string.
The cef_string_t that should be updated.
The .NET string whose value should be used to update cefStr.
Converts a .NET List of strings to native (unmanaged) format.
The List of strings that should be converted.
An unmanaged representation of the provided List of strings, or an empty List if the input is a nullptr.
Converts a .NET string to native (unmanaged) format. Note that this method does not allocate a new copy of the
The string that should be converted.
An unmanaged representation of the provided string, or an empty string if the input string is a nullptr.
Converts an unmanaged vector of strings to a (managed) .NET List of strings.
The vector of strings that should be converted.
A .NET List of strings.
Converts an unmanaged string to a (managed) .NET string.
The string that should be converted.
A .NET string.
Converts an unmanaged string to a (managed) .NET string.
The string that should be converted.
A .NET string.
Register the Widevine CDM plugin.
See for more details.
is a directory that contains the Widevine CDM files
Returns a Task that can be awaited to receive the response.
Register the Widevine CDM plugin.
The client application is responsible for downloading an appropriate
platform-specific CDM binary distribution from Google, extracting the
contents, and building the required directory structure on the local machine.
The method class can be used
to implement this functionality in CefSharp. Contact Google via
https://www.widevine.com/contact.html for details on CDM download.
path is a directory that must contain the following files:
1. manifest.json file from the CDM binary distribution (see below).
2. widevinecdm file from the CDM binary distribution (e.g.
widevinecdm.dll on Windows).
3. widevidecdmadapter file from the CEF binary distribution (e.g.
widevinecdmadapter.dll on Windows).
If any of these files are missing or if the manifest file has incorrect
contents the registration will fail and callback will receive an ErrorCode
value of .
The manifest.json file must contain the following keys:
A. "os": Supported OS (e.g. "mac", "win" or "linux").
B. "arch": Supported architecture (e.g. "ia32" or "x64").
C. "x-cdm-module-versions": Module API version (e.g. "4").
D. "x-cdm-interface-versions": Interface API version (e.g. "8").
E. "x-cdm-host-versions": Host API version (e.g. "8").
F. "version": CDM version (e.g. "1.4.8.903").
G. "x-cdm-codecs": List of supported codecs (e.g. "vp8,vp9.0,avc1").
A through E are used to verify compatibility with the current Chromium
version. If the CDM is not compatible the registration will fail and
callback will receive an ErrorCode value of .
If registration is not supported at the time that Cef.RegisterWidevineCdm() is called then callback
will receive an ErrorCode value of .
is a directory that contains the Widevine CDM files
optional callback -
will be executed asynchronously once registration is complete
Sets or clears a specific key-value pair from the crash metadata.
Crash reporting is configured using an INI-style config file named
crash_reporter.cfg. This file must be placed next to
the main application executable. File contents are as follows:
# Comments start with a hash character and must be on their own line.
[Config]
ProductName=<Value of the "prod" crash key; defaults to "cef">
ProductVersion=<Value of the "ver" crash key; defaults to the CEF version>
AppName=<Windows only; App-specific folder name component for storing crash
information; default to "CEF">
ExternalHandler=<Windows only; Name of the external handler exe to use
instead of re-launching the main exe; default to empty>
ServerURL=<crash server URL; default to empty>
RateLimitEnabled=<True if uploads should be rate limited; default to true>
MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled;
default to 5>
MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value
will cause older reports to be deleted; default to 20>
MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted;
default to 5>
[CrashKeys]
my_key1=<small|medium|large>
my_key2=<small|medium|large>
Config section:
If "ProductName" and/or "ProductVersion" are set then the specified values
will be included in the crash dump metadata.
If "AppName" is set on Windows then crash report information (metrics,
database and dumps) will be stored locally on disk under the
"C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder.
If "ExternalHandler" is set on Windows then the specified exe will be
launched as the crashpad-handler instead of re-launching the main process
exe. The value can be an absolute path or a path relative to the main exe
directory.
If "ServerURL" is set then crashes will be uploaded as a multi-part POST
request to the specified URL. Otherwise, reports will only be stored locally
on disk.
If "RateLimitEnabled" is set to true then crash report uploads will be rate
limited as follows:
1. If "MaxUploadsPerDay" is set to a positive value then at most the
specified number of crashes will be uploaded in each 24 hour period.
2. If crash upload fails due to a network or server error then an
incremental backoff delay up to a maximum of 24 hours will be applied for
retries.
3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the
"MaxUploadsPerDay" value will be reduced to 1 until the client is
restarted. This helps to avoid an upload flood when the network or
server error is resolved.
If "MaxDatabaseSizeInMb" is set to a positive value then crash report storage
on disk will be limited to that size in megabytes. For example, on Windows
each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20 equates to
about 34 crash reports stored on disk.
If "MaxDatabaseAgeInDays" is set to a positive value then crash reports older
than the specified age in days will be deleted.
CrashKeys section:
Any number of crash keys can be specified for use by the application. Crash
key values will be truncated based on the specified size (small = 63 bytes,
medium = 252 bytes, large = 1008 bytes). The value of crash keys can be set
from any thread or process using the Cef.SetCrashKeyValue function. These
key/value pairs will be sent to the crash server along with the crash dump
file. Medium and large values will be chunked for submission. For example,
if your key is named "mykey" then the value will be broken into ordered
chunks and submitted using keys named "mykey-1", "mykey-2", etc.
Returns true if crash reporting is enabled.
Helper function (wrapper around the CefColorSetARGB macro) which combines
the 4 color components into an uint32 for use with BackgroundColor property
Alpha
Red
Green
Blue
Returns the color.
Gets the Global Request Context. Make sure to Dispose of this object when finished.
The earlier possible place to access the IRequestContext is in IBrowserProcessHandler.OnContextInitialized.
Alternative use the ChromiumWebBrowser BrowserInitialized (OffScreen) or IsBrowserInitializedChanged (WinForms/WPF) events.
Returns the global request context or null if the RequestContext has not been initialized yet.
Returns true if called on the specified CEF thread.
Returns true if called on the specified thread.
Call during process startup to enable High-DPI support on Windows 7 or newer.
Older versions of Windows should be left DPI-unaware because they do not
support DirectWrite and GDI fonts are kerned very badly.
Unregister an internal plugin. This may be undone the next time RefreshWebPlugins() is called.
Path (directory + file).
Cause the plugin list to refresh the next time it is accessed regardless of whether it has already been loaded.
Async returns a list containing Plugin Information
(Wrapper around CefVisitWebPluginInfo)
Returns List of structs.
Visit web plugin information. Can be called on any thread in the browser process.
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 Cef.GetGlobalRequestContext().ClearSchemeHandlerFactories().
Returns false on error.
This method should only be used by advanced users, if you're unsure then use Cef.Shutdown().
This function should be called on the main application thread to shut down
the CEF browser process before the application exits. This method simply obtains a lock
and calls the native CefShutdown method, only IsInitialized is checked. All ChromiumWebBrowser
instances MUST be Disposed of before calling this method. If calling this method results in a crash
or hangs then you're likely hanging on to some unmanaged resources or haven't closed all of your browser
instances
Shuts down CefSharp and the underlying CEF infrastructure. This method is safe to call multiple times; it will only
shut down CEF on the first call (all subsequent calls will be ignored).
This method should be called on the main application thread to shut down the CEF browser process before the application exits.
If you are Using CefSharp.OffScreen then you must call this explicitly before your application exits or it will hang.
This method must be called on the same thread as Initialize. If you don't call Shutdown explicitly then CefSharp.Wpf and CefSharp.WinForms
versions will do their best to call Shutdown for you, if your application is having trouble closing then call thus explicitly.
Returns a cookie manager that neither stores nor retrieves cookies. All
usage of cookies will be blocked including cookies accessed via the network
(request/response headers), via JavaScript (document.cookie), and via
CefCookieManager methods. No cookies will be displayed in DevTools. If you
wish to only block cookies sent via the network use the IRequestHandler
CanGetCookies and CanSetCookie methods instead.
A blocking cookie manager
Returns the global cookie manager. By default data will be stored at CefSettings.CachePath if specified or in memory otherwise.
Using this method is equivalent to calling Cef.GetGlobalRequestContext().GetDefaultCookieManager()
The earlier possible place to access the ICookieManager is in IBrowserProcessHandler.OnContextInitialized.
Alternative use the ChromiumWebBrowser BrowserInitialized (OffScreen) or IsBrowserInitializedChanged (WinForms/WPF) events.
A the global cookie manager or null if the RequestContext has not yet been initialized.
Remove all entries from the cross-origin access whitelist.
Remove all entries from the cross-origin access whitelist. Returns false if
the whitelist cannot be accessed.
Remove entry from cross-origin whitelist
The origin allowed to be accessed by the target protocol/domain.
The target protocol allowed to access the source origin.
The optional target domain allowed to access the source origin.
If set to true would allow a blah.example.com if the
was set to example.com
Remove an entry from the cross-origin access whitelist. Returns false if
is invalid or the whitelist cannot be accessed.
Add an entry to the cross-origin whitelist.
The origin allowed to be accessed by the target protocol/domain.
The target protocol allowed to access the source origin.
The optional target domain allowed to access the source origin.
If set to true would allow a blah.example.com if the
was set to example.com
Returns false if is invalid or the whitelist cannot be accessed.
The same-origin policy restricts how scripts hosted from different origins
(scheme + domain + port) can communicate. By default, scripts can only access
resources with the same origin. Scripts hosted on the HTTP and HTTPS schemes
(but no other schemes) can use the "Access-Control-Allow-Origin" header to
allow cross-origin requests. For example, https://source.example.com can make
XMLHttpRequest requests on http://target.example.com if the
http://target.example.com request returns an "Access-Control-Allow-Origin:
https://source.example.com" response header.
Scripts in separate frames or iframes and hosted from the same protocol and
domain suffix can execute cross-origin JavaScript if both pages set the
document.domain value to the same domain suffix. For example,
scheme://foo.example.com and scheme://bar.example.com can communicate using
JavaScript if both domains set document.domain="example.com".
This method is used to allow access to origins that would otherwise violate
the same-origin policy. Scripts hosted underneath the fully qualified
URL (like http://www.example.com) will be allowed access to
all resources hosted on the specified and .
If is non-empty and if false only
exact domain matches will be allowed. If contains a top-
level domain component (like "example.com") and is
true sub-domain matches will be allowed. If is empty and
if true all domains and IP addresses will be
allowed.
This method cannot be used to bypass the restrictions on local or display
isolated schemes. See the comments on for more
information.
This function may be called on any thread. Returns false if
is invalid or the whitelist cannot be accessed.
This function should be called from the application entry point function to execute a secondary process.
It can be used to run secondary processes from the browser client executable (default behavior) or
from a separate executable specified by the CefSettings.browser_subprocess_path value.
If called for the browser process (identified by no "type" command-line value) it will return immediately with a value of -1.
If called for a recognized secondary process it will block until the process should exit and then return the process exit code.
The |application| parameter may be empty. The |windows_sandbox_info| parameter is only used on Windows and may be NULL (see cef_sandbox_win.h for details).
Perform a single iteration of CEF message loop processing.This function is
provided for cases where the CEF message loop must be integrated into an
existing application message loop. Use of this function is not recommended
for most users; use CefSettings.MultiThreadedMessageLoop if possible (the deault).
When using this function care must be taken to balance performance
against excessive CPU usage. It is recommended to enable the
CefSettings.ExternalMessagePump option when using
this function so that IBrowserProcessHandler.OnScheduleMessagePumpWork()
callbacks can facilitate the scheduling process. This function should only be
called on the main application thread and only if Cef.Initialize() is called
with a CefSettings.MultiThreadedMessageLoop value of false. This function
will not block.
Quit the CEF message loop that was started by calling Cef.RunMessageLoop().
This function should only be called on the main application thread and only
if Cef.RunMessageLoop() was used.
Run the CEF message loop. Use this function instead of an application-
provided message loop to get the best balance between performance and CPU
usage. This function should only be called on the main application thread and
only if Cef.Initialize() is called with a
CefSettings.MultiThreadedMessageLoop value of false. This function will
block until a quit message is received by the system.
Initializes CefSharp with user-provided settings.
It's important to note that Initialize/Shutdown MUST be called on your main
applicaiton thread (Typically the UI thead). If you call them on different
threads, your application will hang. See the documentation for Cef.Shutdown() for more details.
CefSharp configuration settings.
Check that all relevant dependencies avaliable, throws exception if any are missing
Implement this interface to provide handler implementations. Null if you don't wish to handle these events
true if successful; otherwise, false.
Initializes CefSharp with user-provided settings.
It's important to note that Initialize/Shutdown MUST be called on your main
applicaiton thread (Typically the UI thead). If you call them on different
threads, your application will hang. See the documentation for Cef.Shutdown() for more details.
CefSharp configuration settings.
Check that all relevant dependencies avaliable, throws exception if any are missing
The handler for functionality specific to the browser process. Null if you don't wish to handle these events
true if successful; otherwise, false.
Initializes CefSharp with user-provided settings.
It's important to note that Initialize and Shutdown MUST be called on your main
applicaiton thread (Typically the UI thead). If you call them on different
threads, your application will hang. See the documentation for Cef.Shutdown() for more details.
CefSharp configuration settings.
true if successful; otherwise, false.
Gets a value that indicates the Git Hash for CEF version currently being used.
The Git Commit Hash
Gets a value that indicates the Chromium version currently being used.
The Chromium version.
Gets a value that indicates the CEF version currently being used.
The CEF Version
Gets a value that indicates the version of CefSharp currently being used.
The CefSharp version.
Gets a value that indicates whether CefSharp is initialized.
true if CefSharp is initialized; otherwise, false.
Method that will be called when CDM registration is complete. |result|
will be CEF_CDM_REGISTRATION_ERROR_NONE if registration completed
successfully. Otherwise, |result| and |error_message| will contain
additional information about why registration failed.
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.
Set command line argument to disable GPU Acceleration, this will disable WebGL.
Register a new V8 extension with the specified JavaScript extension code
The V8Extension that contains the extension code.
Registers a custom scheme using the provided settings.
The CefCustomScheme which provides the details about the scheme.
Background color used for the browser before a document is loaded and when no document color is
specified. The alpha component must be either fully opaque (0xFF) or fully transparent (0x00).
If the alpha component is fully opaque then the RGB components will be used as the background
color. If the alpha component is fully transparent for a WinForms browser then the default value
of opaque white be used. If the alpha component is fully transparent for a windowless
(WPF/OffScreen) browser then transparent painting will be enabled.
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.
To persist user preferences as a JSON file in the cache path directory set
this value to true. A CachePath value must also be specified
to enable this feature. Also configurable using the
"persist-user-preferences" command-line switch. Can be overridden for
individual RequestContext instances via the
RequestContextSettings.PersistUserPreferences value.
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.
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.
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.
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.
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.
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.
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.
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.
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".
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.
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.
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.
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.
Set to true in order to completely ignore SSL certificate errors.
This is NOT recommended.
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).
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.
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
Set to true to have the browser process message loop run in a separate
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
Set to true to control browser process main (UI) thread message pump
scheduling via the IBrowserProcessHandler.OnScheduleMessagePumpWork
callback. This option is recommended for use in combination with the
Cef.DoMessageLoopWork() function in cases where the CEF message loop must be
integrated into an existing application message loop (see additional
comments and warnings on Cef.DoMessageLoopWork). Enabling this option is not
recommended for most users; leave this option disabled and use either
MultiThreadedMessageLoop (the default) if possible.
Set to true to enable date-based expiration of built in network security information (i.e. certificate transparency logs,
HSTS preloading and pinning information). Enabling this option improves network security but may cause HTTPS load failures when
using CEF binaries built more than 10 weeks in the past. See https://www.certificate-transparency.org/ and
https://www.chromium.org/hsts for details. Can be set globally using the CefSettings.EnableNetSecurityExpiration value.
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
Add custom command line argumens to this collection, they will be
added in OnBeforeCommandLineProcessing.
List of all V8Extensions to be registered using CefRegisterExtension
in the render process.
Add Customs schemes to this collection
Default Constructor
Initialization settings. Many of these and other settings can also configured
using command-line switches.
Class representing popup window features.
Load an extension. If extension resources will be read from disk using the default load implementation then rootDirectoy
should be the absolute path to the extension resources directory and manifestJson should be null.
If extension resources will be provided by the client (e.g. via IRequestHandler and/or IExtensionHandler) then rootDirectory
should be a path component unique to the extension (if not absolute this will be internally prefixed with the PK_DIR_RESOURCES path)
and manifestJson should contain the contents that would otherwise be read from the "manifest.json" file on disk.
The loaded extension will be accessible in all contexts sharing the same storage (HasExtension returns true).
However, only the context on which this method was called is considered the loader (DidLoadExtension returns true) and only the
loader will receive IRequestContextHandler callbacks for the extension. will be
called on load success or will be called on load failure.
If the extension specifies a background script via the "background" manifest key then
will be called to create the background browser. See that method for additional information about background scripts.
For visible extension views the client application should evaluate the manifest to determine the correct extension URL to load and then pass
that URL to the IBrowserHost.CreateBrowser* function after the extension has loaded. For example, the client can look for the "browser_action"
manifest key as documented at https://developer.chrome.com/extensions/browserAction. Extension URLs take the form "chrome-extension:///".
Browsers that host extensions differ from normal browsers as follows: - Can access chrome.* JavaScript APIs if allowed by the manifest.
Visit chrome://extensions-support for the list of extension APIs currently supported by CEF. - Main frame navigation to non-extension
content is blocked.
- Pinch-zooming is disabled.
- returns the hosted extension.
- CefBrowserHost::IsBackgroundHost returns true for background hosts. See https://developer.chrome.com/extensions for extension implementation and usage documentation.
If extension resources will be read from disk using the default load implementation then rootDirectoy
should be the absolute path to the extension resources directory and manifestJson should be null
If extension resources will be provided by the client then rootDirectory should be a path component unique to the extension
and manifestJson should contain the contents that would otherwise be read from the manifest.json file on disk
handle events related to browser extensions
Returns true if this context has access to the extension identified by extensionId.
This may not be the context that was used to load the extension (see DidLoadExtension).
This method must be called on the CEF UI thread.
extension id
Returns true if this context has access to the extension identified by extensionId
Use Cef.UIThreadTaskFactory to execute this method if required,
and ChromiumWebBrowser.IsBrowserInitializedChanged are both
executed on the CEF UI thread, so can be called directly.
When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main
application thread will be the CEF UI thread.
Retrieve the list of all extensions that this context has access to (see HasExtension).
will be populated with the list of extension ID values.
This method must be called on the CEF UI thread.
output a list of extensions Ids
returns true on success otherwise false
Use Cef.UIThreadTaskFactory to execute this method if required,
and ChromiumWebBrowser.IsBrowserInitializedChanged are both
executed on the CEF UI thread, so can be called directly.
When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main
application thread will be the CEF UI thread.
Returns the extension matching extensionId or null if no matching extension is accessible in this context (see HasExtension).
This method must be called on the CEF UI thread.
extension Id
Returns the extension matching extensionId or null if no matching extension is accessible in this context
Use Cef.UIThreadTaskFactory to execute this method if required,
and ChromiumWebBrowser.IsBrowserInitializedChanged are both
executed on the CEF UI thread, so can be called directly.
When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main
application thread will be the CEF UI thread.
Returns true if this context was used to load the extension identified by extensionId. Other contexts sharing the same storage will also have access to the extension (see HasExtension).
This method must be called on the CEF UI thread.
Returns true if this context was used to load the extension identified by extensionId
Use Cef.UIThreadTaskFactory to execute this method if required,
and ChromiumWebBrowser.IsBrowserInitializedChanged are both
executed on the CEF UI thread, so can be called directly.
When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main
application thread will be the CEF UI thread.
Attempts to resolve origin to a list of associated IP addresses using
cached data. This method must be called on the CEF IO thread. Use
Cef.IOThreadTaskFactory to execute on that thread.
host name to resolve
list of resolved IP
addresses or empty list if no cached data is available.
Returns on success
Attempts to resolve origin to a list of associated IP addresses.
host name to resolve
A task that represents the Resoolve Host operation. The value of the TResult parameter contains ResolveCallbackResult.
Clears all active and idle connections that Chromium currently has.
This is only recommended if you have released all other CEF objects but
don't yet want to call Cef.Shutdown().
If is non-NULL it will be executed on the CEF UI thread after
completion. This param is optional
Clears all certificate exceptions that were added as part of handling
. If you call this it is
recommended that you also call or you risk not
being prompted again for server certificates if you reconnect quickly.
If is non-NULL it will be executed on the CEF UI thread after
completion. This param is optional
Set the value associated with preference name. If value is null the
preference will be restored to its default value. If setting the preference
fails then error will be populated with a detailed description of the
problem. This method must be called on the CEF UI thread.
Preferences set via the command-line usually cannot be modified.
preference key
preference value
out error
Returns true if the value is set successfully and false otherwise.
Use Cef.UIThreadTaskFactory to execute this method if required,
and ChromiumWebBrowser.IsBrowserInitializedChanged are both
executed on the CEF UI thread, so can be called directly.
When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main
application thread will be the CEF UI thread.
Returns true if the preference with the specified name can be modified
using SetPreference. As one example preferences set via the command-line
usually cannot be modified. This method must be called on the CEF UI thread.
preference key
Returns true if the preference with the specified name can be modified
using SetPreference
Use Cef.UIThreadTaskFactory to execute this method if required,
and ChromiumWebBrowser.IsBrowserInitializedChanged are both
executed on the CEF UI thread, so can be called directly.
When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main
application thread will be the CEF UI thread.
Returns all preferences as a dictionary. The returned
object contains a copy of the underlying preference values and
modifications to the returned object will not modify the underlying
preference values. This method must be called on the browser process UI
thread.
If true then
preferences currently at their default value will be included.
Preferences (dictionary can have sub dictionaries)
Returns the value for the preference with the specified name. Returns
NULL if the preference does not exist. The returned object contains a copy
of the underlying preference value and modifications to the returned object
will not modify the underlying preference value. This method must be called
on the CEF UI thread.
preference name
Returns the value for the preference with the specified name
Use Cef.UIThreadTaskFactory to execute this method if required,
and ChromiumWebBrowser.IsBrowserInitializedChanged are both
executed on the CEF UI thread, so can be called directly.
When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main
application thread will be the CEF UI thread.
Returns true if a preference with the specified name exists. This method
must be called on the CEF UI thread.
name of preference
bool if the preference exists
Use Cef.UIThreadTaskFactory to execute this method if required,
and ChromiumWebBrowser.IsBrowserInitializedChanged are both
executed on the CEF UI thread, so can be called directly.
When CefSettings.MultiThreadedMessageLoop == false (the default is true) then the main
application thread will be the CEF UI thread.
Tells all renderer processes associated with this context to throw away
their plugin list cache. If reloadPages is true they will also reload
all pages with plugins. RequestContextHandler.OnBeforePluginLoad may
be called to rebuild the plugin list cache.
reload any pages with pluginst
Returns the cache path for this object. If empty an "incognito mode"
in-memory cache is being used.
Clear all registered scheme handler factories.
Returns false on error.
Register a scheme handler factory for the specified schemeName and optional domainName.
An empty domainName value for a standard scheme will cause the factory to match all domain
names. The domainName value will be ignored for non-standard schemes. If schemeName is
a built-in scheme and no handler is returned by factory then the built-in scheme handler
factory will be called. If schemeName is a custom scheme then you must also implement the
IApp.OnRegisterCustomSchemes() method in all processes. This function may be called multiple
times to change or remove the factory that matches the specified schemeName and optional
domainName.
Scheme Name
Optional domain name
Scheme handler factory
Returns false if an error occurs.
Returns true if this object is the global context. The global context is
used by default when creating a browser or URL request with a NULL context
argument.
Returns the default cookie manager for this object. This will be the global
cookie manager if this object is the global request context. Otherwise,
this will be the default cookie manager used when this request context does
not receive a value via IRequestContextHandler.GetCookieManager().
If callback is non-NULL it will be executed asnychronously on the CEF IO thread
after the manager's storage has been initialized.
Returns the default cookie manager for this object
Returns true if this object is sharing the same storage as the specified context.
context to compare
Returns true if same storage
Returns true if this object is pointing to the same context object.
context to compare
Returns true if the same
Creates a new context object that shares storage with other and uses an
optional handler.
shares storage with this RequestContext
optional requestContext handler
Returns a nre RequestContext
Creates a new context object that shares storage with | other | and uses an optional | handler | .
A request context provides request handling for a set of related browser objects.
A request context is specified when creating a new browser object via the CefBrowserHost
static factory methods. Browser objects with different request contexts will never be
hosted in the same render process. Browser objects with the same request context may or
may not be hosted in the same render process depending on the process model.
Browser objects created indirectly via the JavaScript window.open function or targeted
links will share the same render process and the same request context as the source browser.
When running in single-process mode there is only a single render process (the main process)
and so all browsers created in single-process mode will share the same request context.
This will be the first request context passed into a CefBrowserHost static factory method
and all other request context objects will be ignored.
Set to true to ignore errors related to invalid SSL certificates.
Enabling this setting can lead to potential security vulnerabilities like
"man in the middle" attacks. Applications that load content from the
internet should not enable this setting. Can be set globally using the
CefSettings.IgnoreCertificateErrors value. This value will be ignored if
CachePath matches the CefSettings.cache_path value.
Set to true to enable date-based expiration of built in network security information (i.e. certificate transparency logs,
HSTS preloading and pinning information). Enabling this option improves network security but may cause HTTPS load failures when
using CEF binaries built more than 10 weeks in the past. See https://www.certificate-transparency.org/ and
https://www.chromium.org/hsts for details. Can be set globally using the CefSettings.EnableNetSecurityExpiration value.
Comma delimited ordered list of language codes without any whitespace that
will be used in the "Accept-Language" HTTP header. Can be set globally
using the CefSettings.accept_language_list value or overridden on a per-
browser basis using the BrowserSettings.AcceptLanguageList value. If
all values are empty then "en-US,en" will be used. This value will be
ignored if CachePath matches the CefSettings.CachePath value.
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. To share the global browser cache and related configuration set
this value to match the CefSettings.CachePath value.
To persist user preferences as a JSON file in the cache path directory set
this value to true. Can be set globally using the
CefSettings.PersistUserPreferences value. This value will be ignored if
CachePath is empty or if it matches the CefSettings.CachePath value.
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. Can be set globally using the
CefSettings.PersistSessionCookies value. This value will be ignored if
CachePath is empty or if it matches the CefSettings.CachePath value.
Default constructor
RequestContextSettings
Gets a value indicating if the browser settings has been disposed.
The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint
will be called for a windowless browser. The actual fps may be lower if
the browser cannot generate frames at the requested rate. The minimum
value is 1 and the maximum value is 60 (default 30). This value can also be
changed dynamically via IBrowserHost.SetWindowlessFrameRate.
Comma delimited ordered list of language codes without any whitespace that
will be used in the "Accept-Language" HTTP header. May be overridden on a
per-browser basis using the CefBrowserSettings.AcceptLanguageList value.
If both values are empty then "en-US,en" will be used. Can be overridden
for individual RequestContext instances via the
RequestContextSettings.AcceptLanguageList value.
Background color used for the browser before a document is loaded and when no document color
is specified. The alpha component must be either fully opaque (0xFF) or fully transparent (0x00).
If the alpha component is fully opaque then the RGB components will be used as the background
color. If the alpha component is fully transparent for a WinForms browser then the
CefSettings.BackgroundColor value will be used. If the alpha component is fully transparent
for a windowless (WPF/OffScreen) browser then transparent painting will be enabled.
Controls whether WebGL can be used. Note that WebGL requires hardware
support and may not work on all systems even when enabled. Also
configurable using the "disable-webgl" command-line switch.
Controls whether the application cache can be used. Also configurable using
the "disable-application-cache" command-line switch.
Controls whether databases can be used. Also configurable using the
"disable-databases" command-line switch.
Controls whether local storage can be used. Also configurable using the
"disable-local-storage" command-line switch.
Controls whether the tab key can advance focus to links. Also configurable
using the "disable-tab-to-links" command-line switch.
Controls whether text areas can be resized. Also configurable using the
"disable-text-area-resize" command-line switch.
Controls whether standalone images will be shrunk to fit the page. Also
configurable using the "image-shrink-standalone-to-fit" command-line
switch.
Controls whether image URLs will be loaded from the network. A cached image
will still be rendered if requested. Also configurable using the
"disable-image-loading" command-line switch.
Controls whether web security restrictions (same-origin policy) will be
enforced. Disabling this setting is not recommend as it will allow risky
security behavior such as cross-site scripting (XSS). Also configurable
using the "disable-web-security" command-line switch.
Controls whether file URLs will have access to other file URLs. Also
configurable using the "allow-access-from-files" command-line switch.
Controls whether file URLs will have access to all URLs. Also configurable
using the "allow-universal-access-from-files" command-line switch.
Controls whether any plugins will be loaded. Also configurable using the
"disable-plugins" command-line switch.
Controls whether DOM pasting is supported in the editor via
execCommand("paste"). The |javascript_access_clipboard| setting must also
be enabled. Also configurable using the "disable-javascript-dom-paste"
command-line switch.
Controls whether JavaScript can access the clipboard. Also configurable
using the "disable-javascript-access-clipboard" command-line switch.
Controls whether JavaScript can be used to close windows that were not
opened via JavaScript. JavaScript can still be used to close windows that
were opened via JavaScript. Also configurable using the
"disable-javascript-close-windows" command-line switch.
Controls whether JavaScript can be executed. (Used to Enable/Disable javascript)
Also configurable using the "disable-javascript" command-line switch.
Controls the loading of fonts from remote sources. Also configurable using
the "disable-remote-fonts" command-line switch.
Default encoding for Web content. If empty "ISO-8859-1" will be used. Also
configurable using the "default-encoding" command-line switch.
MinimumLogicalFontSize
MinimumFontSize
DefaultFixedFontSize
DefaultFontSize
FantasyFontFamily
CursiveFontFamily
SansSerifFontFamily
SerifFontFamily
FixedFontFamily
StandardFontFamily
Default Constructor
Internal Constructor
Browser initialization settings. Specify NULL or 0 to get the recommended
default values. The consequences of using custom values may not be well
tested. Many of these and other settings can also configured using command-
line switches.
Get the image hotspot (drag start location relative to image dimensions).
Get the image representation of drag data.
May return NULL if no image representation is available.
Returns the image width in density independent pixel(DIP) units.
Removes the representation for scaleFactor.
true for success
Returns true if this Image and that Image share the same underlying storage.
image to compare
returns true if share same underlying storage
Returns true if this Image is empty.
Returns true if this image contains a representation for scaleFactor.
Returns the image height in density independent pixel(DIP) units.
Returns information for the representation that most closely matches scaleFactor.
scale factor
actual scale factor
pixel width
pixel height
return if information found for scale factor
Returns the PNG representation that most closely matches scaleFactor.
scale factor
is the PNG transparent
pixel width
pixel height
A stream represending the PNG or null.
Returns the JPEG representation that most closely matches scaleFactor.
scale factor
image quality
pixel width
pixel height
A stream representing the JPEG or null.
Returns the bitmap representation that most closely matches scaleFactor.
scale factor
color type
alpha type
pixel width
pixel height
A stream represending the bitmap or null.
Load the request represented by the |request| object.