Returns true if the underlying POST data includes elements that are not
represented by this IPostData object (for example, multi-part file upload
data). Modifying IPostData objects with excluded elements may result in
the request failing.
Create a new instance
PostDataElement
Remove all existing post data elements.
Remove the specified .
element to be removed.
Returns true if the add succeeds.
Add the specified .
element to be added.
Returns true if the add succeeds.
Retrieve the post data elements.
Returns true if this object is read-only.
Initializes a new instance of the PostData class.
Throw exception if Readonly
Thrown when an exception error condition occurs.
Destructor.
Finalizer.
Form Post Data
Constructor.
The popup features.
Class representing popup window features.
Post an action for execution on the specified thread.
thread id
action to execute
bool
Post an action for delayed execution on the specified thread.
thread id
action to execute
delay in ms
bool
Helper method to ensure all ChromiumWebBrowser instances have been
closed/disposed, should be called before Cef.Shutdown.
Disposes all remaning ChromiumWebBrowser instances
then waits for CEF to release it's remaning CefBrowser instances.
Finally a small delay of 50ms to allow for CEF to finish it's cleanup.
Should only be called when MultiThreadedMessageLoop = true;
(Hasn't been tested when when CEF integrates into main message loop).
The timeout in miliseconds.
Helper method to ensure all ChromiumWebBrowser instances have been
closed/disposed, should be called before Cef.Shutdown.
Disposes all remaning ChromiumWebBrowser instances
then waits for CEF to release it's remaning CefBrowser instances.
Finally a small delay of 50ms to allow for CEF to finish it's cleanup.
Should only be called when MultiThreadedMessageLoop = true;
(Hasn't been tested when when CEF integrates into main message loop).
WaitForBrowsersToClose is not enabled by default, call this method
before Cef.Initialize to enable. If you aren't calling Cef.Initialize
explicitly then this should be called before creating your first
ChromiumWebBrowser instance.
Returns the mime type for the specified file extension or an empty string if unknown.
file extension
Returns the mime type for the specified file extension or an empty string if unknown.
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.
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.
Called prior to calling Cef.Shutdown, this diposes of any remaning
ChromiumWebBrowser instances. In WPF this is used from Dispatcher.ShutdownStarted
to release the unmanaged resources held by the ChromiumWebBrowser instances.
Generally speaking you don't need to call this yourself.
This function can optionally be called on the main application thread after
CefInitialize to retrieve the initialization exit code. When CefInitialize
returns true the exit code will be 0 (ResultCode.NormalExit).
Otherwise, see ResultCode for possible exit code values including
browser process initialization errors and normal early exit conditions
(such as ResultCode.NormalExitProcessNotified for process singleton relaunch behavior).
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().GetCookieManager()
The cookie managers storage is created in an async fashion, whilst this method may return a cookie manager instance,
there may be a short delay before you can Get/Write cookies.
To be sure the cookie manager has been initialized use one of the following
- Access the ICookieManager after ICompletionCallback.OnComplete has been called
- Access the ICookieManager instance in IBrowserProcessHandler.OnContextInitialized.
- Use the ChromiumWebBrowser BrowserInitialized (OffScreen) or IsBrowserInitializedChanged (WinForms/WPF) events.
If non-NULL it will be executed asnychronously on the CEF UI thread after the manager's storage has been initialized.
A the global cookie manager or null if the RequestContext has not yet been initialized.
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().GetCookieManager()
The cookie managers storage is created in an async fashion, whilst this method may return a cookie manager instance,
there may be a short delay before you can Get/Write cookies.
To be sure the cookie manager has been initialized use one of the following
- Use the GetGlobalCookieManager(ICompletionCallback) overload and access the ICookieManager after
ICompletionCallback.OnComplete has been called.
- Access the ICookieManager instance in IBrowserProcessHandler.OnContextInitialized.
- 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 default).
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
application thread (typically the UI thread). 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/Shutdown MUST be called on your main
application thread (typically the UI thread). 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
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
application thread (typically the UI thread). 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.
Parse the specified url into its component parts.
Uses a GURL to parse the Url. GURL is Google's URL parsing library.
url
Returns null if the URL is empty or invalid.
Configures the CEF API version and returns API hashes for the libcef
library. The entry parameter describes which hash value will be returned:
0 - CEF_API_HASH_PLATFORM
1 - CEF_API_HASH_UNIVERSAL (deprecated, same as CEF_API_HASH_PLATFORM)
2 - CEF_COMMIT_HASH (from cef_version.h)
parameter should be CEF_API_VERSION and any changes to this value will be ignored after the first call to this method.
The entry parameter describes which hash value will be returned:
returns API hashes for the libcef library.
The returned string is owned by the library and should not be freed.
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.
API hashes for the selected CEF_API_VERSION. API hashes are created for
each version by analyzing CEF header files for C API type definitions. The
hash value will change when header files are modified in a way that may
cause binary incompatibility with other builds.
API version that will be compiled client-side. The experimental (unversioned)
API is selected by default. Clients can set the CEF_API_VERSION value in
their project configuration to configure an explicit API version. Unlike
the experimental API, explicit API versions are back/forward compatible with
a specific range of CEF versions.
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 was shutdown.
true if CefSharp was shutdown; otherwise, false.
Gets a value that indicates whether CefSharp is initialized.
true if CefSharp is initialized; otherwise, false.
Global CEF methods are exposed through this class. e.g. CefInitalize maps to Cef.Initialize
CEF API Doc https://magpcss.org/ceforum/apidocs3/projects/(default)/(_globals).html
This class cannot be inherited.
Create a new object with explicit response values.
Create a new object with default response values.
Implementation of the CefResourceHandler class for reading from a CefStream.
Registers a custom scheme using the provided settings.
The CefCustomScheme which provides the details about the scheme.
If CookieableSchemesExcludeDefaults is false the
default schemes ("http", "https", "ws" and "wss") will also be supported.
Specifying a CookieableSchemesList value and setting
CookieableSchemesExcludeDefaults to true will disable all loading
and saving of cookies for this manager. Can be overridden
for individual RequestContext instances via the
RequestContextSettings.CookieableSchemesList and
RequestContextSettings.CookieableSchemesExcludeDefaults values.
Comma delimited list of schemes supported by the associated
ICookieManager. If CookieableSchemesExcludeDefaults is false the
default schemes ("http", "https", "ws" and "wss") will also be supported.
Specifying a CookieableSchemesList value and setting
CookieableSchemesExcludeDefaults to true will disable all loading
and saving of cookies for this manager. Can be overridden
for individual RequestContext instances via the
RequestContextSettings.CookieableSchemesList and
RequestContextSettings.CookieableSchemesExcludeDefaults values.
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.
The directory where data for the global browser cache will be stored on disk.
If this value is non-empty then it must be an absolute path that is either equal to or a child directory
of RootCachePath. If this value is empty then browsers will be created in "incognito mode"
where in-memory caches are used for storage and no profile-specific data is persisted to disk
(installation-specific data will still be persisted in RootCachePath). HTML5 databases
such as localStorage will only persist across sessions if a cache path is specified.
Can be overridden for individual RequestContext instances via the RequestContextSettings.CachePath value.
Any child directory value will be ignored and the "default" profile (also a child directory) will be used
instead.
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 "user-agent-product" 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. When set to
no messages will be written to the log file, but Fatal messages will still be
output to stderr. Also configurable using the "log-severity" command-line switch with a value of "verbose", "info", "warning",
"error", "fatal", "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
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. If this value is non-empty then it must be an absolute path. 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.
The location where data for the global browser cache will be stored on disk. In this value is non-empty then it must be
an absolute path that is must be either equal to or a child directory of CefSettings.RootCachePath (if RootCachePath is
empty it will default to this value). If the value is 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 RequestContext 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. If this value is non-empty then it must be an absolute path.
Also configurable using the "browser-subprocess-path" command-line switch.
Defaults to using the provided CefSharp.BrowserSubprocess.exe instance
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 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. The
CefSettings.CommandLineArgsDisabled value can be used to start with an empty command-line object. Any values specified in
CefSettings that equate to command-line arguments will be set before this method is called.
Add Customs schemes to this collection.
Destructor.
Finalizer.
Default Constructor.
CefCustomScheme collection
CefSettings unmanaged pointer
Command Line Arguments Dictionary.
Initialization settings. Many of these and other settings can also configured using command-line switches.
WPF/WinForms/OffScreen each have their own CefSettings implementation that sets
relevant settings e.g. OffScreen starts with audio muted.
Generates a JSON string from the specified root |node| which should be a
dictionary or list value. Returns an empty string on failure. This method
requires exclusive access to |node| including any underlying data.
Parses the specified |json_string| and returns a dictionary or list
representation. If JSON parsing fails this method returns NULL and populates
|error_msg_out| with a formatted error message.
Parses the specified UTF8-encoded |json| buffer of size |json_size| and
returns a dictionary or list representation. If JSON parsing fails this
method returns NULL.
Parses the specified |json_string| and returns a dictionary or list
representation. If JSON parsing fails this method returns NULL.
Unescapes |text| and returns the result. Unescaping consists of looking for
the exact pattern "%XX" where each X is a hex digit and converting to the
character with the numerical value of those digits (e.g. "i%20=%203%3b"
unescapes to "i = 3;"). If |convert_to_utf8| is true this function will
attempt to interpret the initial decoded result as UTF-8. If the result is
convertable into UTF-8 it will be returned as converted. Otherwise the
initial decoded result will be returned. The |unescape_rule| parameter
supports further customization the decoding process.
Escapes characters in |text| which are unsuitable for use as a query
parameter value. Everything except alphanumerics and -_.!~*'() will be
converted to "%XX". If |use_plus| is true spaces will change to "+". The
result is basically the same as encodeURIComponent in Javacript.
Decodes the base64 encoded string |data|. The returned value will be NULL if
the decoding fails.
Encodes |data| as a base64 string.
Get the extensions associated with the given mime type. This should be
passed in lower case. There could be multiple extensions for a given mime
type, like "html,htm" for "text/html", or "txt,text,html,..." for "text/*".
Any existing elements in the provided vector will not be erased.
Returns the mime type for the specified file extension or an empty string if
unknown.
This is a convenience function for formatting a URL in a concise and human-
friendly way to help users make security-related decisions (or in other
circumstances when people need to distinguish sites, origins, or otherwise-
simplified URLs from each other). Internationalized domain names (IDN) may
be presented in Unicode if the conversion is considered safe. The returned
value will (a) omit the path for standard schemes, excepting file and
filesystem, and (b) omit the port if it is the default for the scheme. Do
not use this for URLs which will be parsed or sent to other applications.
Creates a URL from the specified |parts|, which must contain a non-empty
spec or a non-empty host and path (at a minimum), but not both.
Returns false if |parts| isn't initialized as described.
Parse the specified |url| into its component parts.
Returns false if the URL is empty or invalid.
Combines specified |base_url| and |relative_url| into |resolved_url|.
Returns false if one of the URLs is empty or invalid.
ref
Interface that should be implemented by the CefUrlRequest client.
The methods of this class will be called on the same thread that created
the request unless otherwise documented.
Called on the IO thread when the browser needs credentials from the user.
|isProxy| indicates whether the host is a proxy server. |host| contains
the hostname and |port| contains the port number. Return true to continue
the request and call CefAuthCallback::Continue() when the authentication
information is available. If the request has an associated browser/frame
then returning false will result in a call to GetAuthCredentials on the
CefRequestHandler associated with that browser, if any. Otherwise,
returning false will cancel the request immediately. This method will only
be called for requests initiated from the browser process.
Called on the IO thread when the browser needs credentials from the user.
|isProxy| indicates whether the host is a proxy server. |host| contains
the hostname and |port| contains the port number. Return true to continue
the request and call CefAuthCallback::Continue() when the authentication
information is available. If the request has an associated browser/frame
then returning false will result in a call to GetAuthCredentials on the
CefRequestHandler associated with that browser, if any. Otherwise,
returning false will cancel the request immediately. This method will only
be called for requests initiated from the browser process.
Called when some part of the response is read. |data| contains the current
bytes received since the last call. This method will not be called if the
UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
Called when some part of the response is read. |data| contains the current
bytes received since the last call. This method will not be called if the
UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
Notifies the client of download progress. |current| denotes the number of
bytes received up to the call and |total| is the expected total size of
the response (or -1 if not determined).
Notifies the client of download progress. |current| denotes the number of
bytes received up to the call and |total| is the expected total size of
the response (or -1 if not determined).
Notifies the client of upload progress. |current| denotes the number of
bytes sent so far and |total| is the total size of uploading data (or -1
if chunked upload is enabled). This method will only be called if the
UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
Notifies the client of upload progress. |current| denotes the number of
bytes sent so far and |total| is the total size of uploading data (or -1
if chunked upload is enabled). This method will only be called if the
UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
Notifies the client that the request has completed. Use the
CefURLRequest::GetRequestStatus method to determine if the request was
successful or not.
Notifies the client that the request has completed. Use the
CefURLRequest::GetRequestStatus method to determine if the request was
successful or not.
Interface that should be implemented by the CefURLRequest client. The
methods of this class will be called on the same thread that created the
request unless otherwise documented.
Interface that should be implemented by the CefURLRequest client. The
methods of this class will be called on the same thread that created the
request unless otherwise documented.
Cancel the request.
Cancel the request.
Returns true if the response body was served from the cache. This includes
responses for which revalidation was required.
Returns true if the response body was served from the cache. This includes
responses for which revalidation was required.
Returns the response, or NULL if no response information is available.
Response information will only be available after the upload has
completed. The returned object is read-only and should not be modified.
Returns the response, or NULL if no response information is available.
Response information will only be available after the upload has
completed. The returned object is read-only and should not be modified.
Returns the request error if status is UR_CANCELED or UR_FAILED, or 0
otherwise.
Returns the request error if status is UR_CANCELED or UR_FAILED, or 0
otherwise.
Returns the request status.
Returns the request status.
Returns the client.
Returns the client.
Returns the request object used to create this URL request. The returned
object is read-only and should not be modified.
Returns the request object used to create this URL request. The returned
object is read-only and should not be modified.
Create a new URL request that is not associated with a specific browser or
frame. Use CefFrame::CreateURLRequest instead if you want the request to
have this association, in which case it may be handled differently (see
documentation on that method). A request created with this method may only
originate from the browser process, and will behave as follows:
- It may be intercepted by the client via CefResourceRequestHandler or
CefSchemeHandlerFactory.
- POST data may only contain only a single element of type PDE_TYPE_FILE
or PDE_TYPE_BYTES.
- If |request_context| is empty the global request context will be used.
The |request| object will be marked as read-only after calling this
method.
Create a new URL request that is not associated with a specific browser or
frame. Use CefFrame::CreateURLRequest instead if you want the request to
have this association, in which case it may be handled differently (see
documentation on that method). A request created with this method may only
originate from the browser process, and will behave as follows:
- It may be intercepted by the client via CefResourceRequestHandler or
CefSchemeHandlerFactory.
- POST data may only contain only a single element of type PDE_TYPE_FILE
or PDE_TYPE_BYTES.
- If |request_context| is empty the global request context will be used.
The |request| object will be marked as read-only after calling this
method.
Class used to make a URL request. URL requests are not associated with a
browser instance so no CefClient callbacks will be executed. URL requests
can be created on any valid CEF thread in either the browser or render
process. Once created the methods of the URL request object must be accessed
on the same thread that created it.
Class used to make a URL request. URL requests are not associated with a
browser instance so no CefClient callbacks will be executed. URL requests
can be created on any valid CEF thread in either the browser or render
process. Once created the methods of the URL request object must be accessed
on the same thread that created it.
Load the request represented by the |request| object.
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.
Return the handler for functionality specific to the render process. This
method is called on the render process main thread.
Return the handler for functionality specific to the browser process. This
method is called on multiple threads in the browser process.
Return the handler for resource bundle events. If no handler is returned
resources will be loaded from pack files. This method is called by the
browser and render processes on multiple threads.
Provides an opportunity to register custom schemes. Do not keep a
reference to the |registrar| object. This method is called on the main
thread for each process and the registered schemes should be the same
across all processes.
Provides an opportunity to view and/or modify command-line arguments
before processing by CEF and Chromium. The |process_type| value will be
empty for the browser process. Do not keep a reference to the
CefCommandLine object passed to this method. The
cef_settings_t.command_line_args_disabled value can be used to start with
an empty command-line object. Any values specified in CefSettings that
equate to command-line arguments will be set before this method is called.
Be cautious when using this method to modify command-line arguments for
non-browser processes as this may result in undefined behavior including
crashes.
Implement this interface to provide handler implementations. Methods will be
called by the process and/or thread indicated.
Quit the CEF message loop that was started by calling CefRunMessageLoop().
This function should only be called on the main application thread and only
if CefRunMessageLoop() 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 CefInitialize() is called with a
cef_settings_t.multi_threaded_message_loop value of false. This function
will block until a quit message is received by the system.
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 either the CefRunMessageLoop() function or
cef_settings_t.multi_threaded_message_loop if possible. When using this
function care must be taken to balance performance against excessive CPU
usage. It is recommended to enable the cef_settings_t.external_message_pump
option when using this function so that
CefBrowserProcessHandler::OnScheduleMessagePumpWork() callbacks can
facilitate the scheduling process. This function should only be called on
the main application thread and only if CefInitialize() is called with a
cef_settings_t.multi_threaded_message_loop value of false. This function
will not block.
This function should be called on the main application thread to shut down
the CEF browser process before the application exits. Do not call any
other CEF functions after calling this function.
This function can optionally be called on the main application thread after
CefInitialize to retrieve the initialization exit code. When CefInitialize
returns true the exit code will be 0 (CEF_RESULT_CODE_NORMAL_EXIT).
Otherwise, see cef_resultcode_t for possible exit code values including
browser process initialization errors and normal early exit conditions (such
as CEF_RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED for process singleton
relaunch behavior).
This function should be called on the main application thread to initialize
the CEF browser process. The |application| parameter may be empty. Returns
true if initialization succeeds. Returns false if initialization fails or if
early exit is desired (for example, due to process singleton relaunch
behavior). If this function returns false then the application should exit
immediately without calling any other CEF functions except, optionally,
CefGetErrorCode. The |windows_sandbox_info| parameter is only used on
Windows and may be NULL (see cef_sandbox_win.h for details).
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 cef_settings_t.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).
Return a new resource handler instance to handle the request or an empty
reference to allow default handling of the request. |browser| and |frame|
will be the browser window and frame respectively that originated the
request or NULL if the request did not originate from a browser window
(for example, if the request came from CefURLRequest). The |request|
object passed to this method cannot be modified.
Return a new resource handler instance to handle the request or an empty
reference to allow default handling of the request. |browser| and |frame|
will be the browser window and frame respectively that originated the
request or NULL if the request did not originate from a browser window
(for example, if the request came from CefURLRequest). The |request|
object passed to this method cannot be modified.
Class that creates CefResourceHandler instances for handling scheme
requests. The methods of this class will always be called on the IO thread.
Class that creates CefResourceHandler instances for handling scheme
requests. The methods of this class will always be called on the IO thread.
Register a custom scheme. This method should not be called for the
built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.
See cef_scheme_options_t for possible values for |options|.
This function may be called on any thread. It should only be called once
per unique |scheme_name| value. If |scheme_name| is already registered or
if an error occurs this method will return false.
Register a custom scheme. This method should not be called for the
built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.
See cef_scheme_options_t for possible values for |options|.
This function may be called on any thread. It should only be called once
per unique |scheme_name| value. If |scheme_name| is already registered or
if an error occurs this method will return false.
Class that manages custom scheme registrations.
Class that manages custom scheme registrations.
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
CefRequestContext::GetGlobalContext()->ClearSchemeHandlerFactories().
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
CefRequestContext::GetGlobalContext()->ClearSchemeHandlerFactories().
Register a scheme handler factory with the global request context. An empty
|domain_name| value for a standard scheme will cause the factory to match
all domain names. The |domain_name| value will be ignored for non-standard
schemes. If |scheme_name| is a built-in scheme and no handler is returned by
|factory| then the built-in scheme handler factory will be called. If
|scheme_name| is a custom scheme then you must also implement the
CefApp::OnRegisterCustomSchemes() method in all processes. This function may
be called multiple times to change or remove the factory that matches the
specified |scheme_name| and optional |domain_name|. Returns false if an
error occurs. This function may be called on any thread in the browser
process. Using this function is equivalent to calling
CefRequestContext::GetGlobalContext()->RegisterSchemeHandlerFactory().
Register a scheme handler factory with the global request context. An empty
|domain_name| value for a standard scheme will cause the factory to match
all domain names. The |domain_name| value will be ignored for non-standard
schemes. If |scheme_name| is a built-in scheme and no handler is returned by
|factory| then the built-in scheme handler factory will be called. If
|scheme_name| is a custom scheme then you must also implement the
CefApp::OnRegisterCustomSchemes() method in all processes. This function may
be called multiple times to change or remove the factory that matches the
specified |scheme_name| and optional |domain_name|. Returns false if an
error occurs. This function may be called on any thread in the browser
process. Using this function is equivalent to calling
CefRequestContext::GetGlobalContext()->RegisterSchemeHandlerFactory().
Called to retrieve data for the specified |resource_id| nearest the scale
factor |scale_factor|. To provide the resource data set |data| and
|data_size| to the data pointer and size respectively and return true. To
use the default resource data return false. The resource data will not be
copied and must remain resident in memory. Use the
cef_id_for_pack_resource_name() function for version-safe mapping of
resource IDR names from cef_pack_resources.h to version-specific numerical
|resource_id| values.
Called to retrieve data for the specified scale independent |resource_id|.
To provide the resource data set |data| and |data_size| to the data
pointer and size respectively and return true. To use the default resource
data return false. The resource data will not be copied and must remain
resident in memory. Use the cef_id_for_pack_resource_name() function for
version-safe mapping of resource IDR names from cef_pack_resources.h to
version-specific numerical |resource_id| values.
Called to retrieve a localized translation for the specified |string_id|.
To provide the translation set |string| to the translation string and
return true. To use the default translation return false. Use the
cef_id_for_pack_string_name() function for version-safe mapping of string
IDS names from cef_pack_strings.h to version-specific numerical
|string_id| values.
Class used to implement a custom resource bundle interface. See CefSettings
for additional options related to resource bundle loading. The methods of
this class may be called on multiple threads.
Called when a new message is received from a different process. Return
true if the message was handled or false otherwise. It is safe to keep a
reference to |message| outside of this callback.
Called when a new node in the the browser gets focus. The |node| value may
be empty if no specific node has gained focus. The node object passed to
this method represents a snapshot of the DOM at the time this method is
executed. DOM objects are only valid for the scope of this method. Do not
keep references to or attempt to access any DOM objects outside the scope
of this method.
Called for global uncaught exceptions in a frame. Execution of this
callback is disabled by default. To enable set
cef_settings_t.uncaught_exception_stack_size > 0.
Called immediately before the V8 context for a frame is released. No
references to the context should be kept after this method is called.
Called immediately after the V8 context for a frame has been created. To
retrieve the JavaScript 'window' object use the CefV8Context::GetGlobal()
method. V8 handles can only be accessed from the thread on which they are
created. A task runner for posting tasks on the associated thread can be
retrieved via the CefV8Context::GetTaskRunner() method.
Return the handler for browser load status events.
Called before a browser is destroyed.
Called after a browser has been created. When browsing cross-origin a new
browser will be created before the old browser with the same identifier is
destroyed. |extra_info| is an optional read-only value originating from
CefBrowserHost::CreateBrowser(), CefBrowserHost::CreateBrowserSync(),
CefLifeSpanHandler::OnBeforePopup() or
CefBrowserView::CreateBrowserView().
Called after WebKit has been initialized.
Class used to implement render process callbacks. The methods of this class
will be called on the render process main thread (TID_RENDERER) unless
otherwise indicated.
Return the default handler for use with a new user or incognito profile
(CefRequestContext object). If null is returned the CefRequestContext will
be unmanaged (no callbacks will be executed for that CefRequestContext).
This method is currently only used with Chrome style when creating new
browser windows via Chrome UI.
Return the default client for use with a newly created browser window
(CefBrowser object). If null is returned the CefBrowser will be unmanaged
(no callbacks will be executed for that CefBrowser) and application
shutdown will be blocked until the browser window is closed manually. This
method is currently only used with Chrome style when creating new browser
windows via Chrome UI.
Implement this method to provide app-specific behavior when an already
running app is relaunched with the same CefSettings.root_cache_path value.
For example, activate an existing app window or create a new app window.
|command_line| will be read-only. Do not keep a reference to
|command_line| outside of this method. Return true if the relaunch is
handled or false for default relaunch behavior. Default behavior will
create a new default styled Chrome window.
To avoid cache corruption only a single app instance is allowed to run for
a given CefSettings.root_cache_path value. On relaunch the app checks a
process singleton lock and then forwards the new launch arguments to the
already running app process before exiting early. Client apps should
therefore check the CefInitialize() return value for early exit before
proceeding.
This method will be called on the browser process UI thread.
Called before a child process is launched. Will be called on the browser
process UI thread when launching a render process and on the browser
process IO thread when launching a GPU process. Provides an opportunity to
modify the child process command line. Do not keep a reference to
|command_line| outside of this method.
Called on the browser process UI thread immediately after the CEF context
has been initialized.
Provides an opportunity to register custom preferences prior to
global and request context initialization.
If |type| is CEF_PREFERENCES_TYPE_GLOBAL the registered preferences can be
accessed via CefPreferenceManager::GetGlobalPreferences after
OnContextInitialized is called. Global preferences are registered a single
time at application startup. See related cef_settings_t.cache_path
configuration.
If |type| is CEF_PREFERENCES_TYPE_REQUEST_CONTEXT the preferences can be
accessed via the CefRequestContext after
CefRequestContextHandler::OnRequestContextInitialized is called. Request
context preferences are registered each time a new CefRequestContext is
created. It is intended but not required that all request contexts have
the same registered preferences. See related
cef_request_context_settings_t.cache_path configuration.
Do not keep a reference to the |registrar| object. This method is called
on the browser process UI thread.
Class used to implement browser process callbacks. The methods of this class
will be called on the browser process main thread unless otherwise
indicated.
Insert a command before the current command.
Common for debuggers, like "valgrind" or "gdb --args".
Add an argument to the end of the command line.
Get the remaining command line arguments.
True if there are remaining command line arguments.
Add a switch with the specified value to the end of the command line. If
the switch has no value pass an empty value string.
Add a switch to the end of the command line.
Returns the map of switch names and values. If a switch has no value an
empty string is returned.
Returns the value associated with the given switch. If the switch has no
value or isn't present this method returns the empty string.
Returns true if the command line contains the given switch.
Returns true if the command line has switches.
Set the program part of the command line string (the first item).
Get the program part of the command line string (the first item).
Constructs and returns the represented command line string. Use this
method cautiously because quoting behavior is unclear.
Retrieve the original command line string as a vector of strings.
The argv array:
`{ program, [(--|-|/)switch[=value]]*, [--], [argument]* }`
Reset the command-line switches and arguments but leave the program
component unchanged.
Initialize the command line with the string returned by calling
GetCommandLineW(). This method is only supported on Windows.
Initialize the command line with the specified |argc| and |argv| values.
The first argument must be the name of the program. This method is only
supported on non-Windows platforms.
Returns a writable copy of this object.
Returns true if the values of this object are read-only. Some APIs may
expose read-only objects.
Returns true if this object is valid. Do not call any other methods if
this function returns false.
Returns the singleton global CefCommandLine object. The returned object
will be read-only.
Create a new CefCommandLine instance.
Class used to create and/or parse command line arguments. Arguments with
"--", "-" and, on Windows, "/" prefixes are considered switches. Switches
will always precede any arguments without switch prefixes. Switches can
optionally have a value specified using the "=" delimiter (e.g.
"-switch=value"). An argument of "--" will terminate switch parsing with all
subsequent tokens, regardless of prefix, being interpreted as non-switch
arguments. Switch names should be lowercase ASCII and will be converted to
such if necessary. Switch values will retain the original case and UTF8
encoding. This class can be used before CefInitialize() is called.
Gets the inner most instance
current instance
Sets the current value for for the specified URLs in the
default scope. If both URLs are empty, and the context is not incognito,
the default value will be set. Pass for
to use the default value for this content type.
WARNING: Incorrect usage of this method may cause instability or security
issues in Chromium. Make sure that you first understand the potential
impact of any changes to |content_type| by reviewing the related source
code in Chromium. For example, if you plan to modify
, first review and understand the usage of
ContentSettingsType::POPUPS in Chromium:
https://source.chromium.org/search?q=ContentSettingsType::POPUPS
Requesting url
Top level url
Content type
value
Returns the current value for that applies for the
specified URLs. If both URLs are empty the default value will be returned.
Returns if no value is configured. Must
be called on the browser process UI thread.
Requesting url
Top level url
Content type
Returns the current value for that applies for the
specified URLs.
Sets the current value for for the specified URLs in the
default scope. If both URLs are empty, and the context is not incognito,
the default value will be set. Pass null for to remove the
default value for this content type.
WARNING: Incorrect usage of this method may cause instability or security
issues in Chromium. Make sure that you first understand the potential
impact of any changes to by reviewing the related source
code in Chromium. For example, if you plan to modify
, first review and understand the usage of
ContentSettingsType::POPUPS in Chromium:
https://source.chromium.org/search?q=ContentSettingsType::POPUPS
Requesting url
Top level url
Content type
value
Returns the current value for that applies for the
specified URLs. If both URLs are empty the default value will be returned.
Returns null if no value is configured.
Must be called on the browser
process UI thread.
Requesting url
Top level url
Content type
Returns the current value for that applies for the
specified URLs.
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 HTTP authentication credentials that were added as part of handling
.
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.
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.
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 new 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.
Called on the browser process IO thread before a resource request is
initiated. The |browser| and |frame| values represent the source of the
request, and may be NULL for requests originating from service workers or
CefURLRequest. |request| represents the request contents and cannot be
modified in this callback. |is_navigation| will be true if the resource
request is a navigation. |is_download| will be true if the resource
request is a download. |request_initiator| is the origin (scheme + domain)
of the page that initiated the request. Set |disable_default_handling| to
true to disable default handling of the request, in which case it will
need to be handled via CefResourceRequestHandler::GetResourceHandler or it
will be canceled. To allow the resource load to proceed with default
handling return NULL. To specify a handler for the resource return a
CefResourceRequestHandler object. This method will not be called if the
client associated with |browser| returns a non-NULL value from
CefRequestHandler::GetResourceRequestHandler for the same request
(identified by CefRequest::GetIdentifier).
Called on the browser process IO thread before a resource request is
initiated. The |browser| and |frame| values represent the source of the
request, and may be NULL for requests originating from service workers or
CefURLRequest. |request| represents the request contents and cannot be
modified in this callback. |is_navigation| will be true if the resource
request is a navigation. |is_download| will be true if the resource
request is a download. |request_initiator| is the origin (scheme + domain)
of the page that initiated the request. Set |disable_default_handling| to
true to disable default handling of the request, in which case it will
need to be handled via CefResourceRequestHandler::GetResourceHandler or it
will be canceled. To allow the resource load to proceed with default
handling return NULL. To specify a handler for the resource return a
CefResourceRequestHandler object. This method will not be called if the
client associated with |browser| returns a non-NULL value from
CefRequestHandler::GetResourceRequestHandler for the same request
(identified by CefRequest::GetIdentifier).
Called on the browser process UI thread immediately after the request
context has been initialized.
Called on the browser process UI thread immediately after the request
context has been initialized.
Implement this interface to provide handler implementations. The handler
instance will not be released until all objects related to the context have
been destroyed.
Implement this interface to provide handler implementations. The handler
instance will not be released until all objects related to the context have
been destroyed.
If CookieableSchemesExcludeDefaults is false the
default schemes ("http", "https", "ws" and "wss") will also be supported.
Specifying a CookieableSchemesList value and setting
CookieableSchemesExcludeDefaults to true will disable all loading
and saving of cookies for this manager. This value will be ignored if
matches the value.
Comma delimited list of schemes supported by the associated
ICookieManager. If CookieableSchemesExcludeDefaults is false the
default schemes ("http", "https", "ws" and "wss") will also be supported.
Specifying a CookieableSchemesList value and setting
CookieableSchemesExcludeDefaults to true will disable all loading
and saving of cookies for this manager. This value will be ignored if
matches the 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 directory where cache data for this request context will be stored on disk.
If this value is non - empty then it must be an absolute path that is either equal to or a
child directory of CefSettings.RootCachePath.If this value is empty then browsers will be
created in "incognito mode" where in - memory caches are used for storage and no profile -
specific data is persisted to disk(installation - specific data will still be persisted in RootCachePath).
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 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.
Initializes a new instance of the RequestContextSettings class.
RequestContextSettings
True if dispose should be called after this object is used
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.
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 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 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
Destructor.
Finalizer.
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.
Called when a new message is received from a different process. Return
true if the message was handled or false otherwise. It is safe to keep a
reference to |message| outside of this callback.
Called when a new message is received from a different process. Return
true if the message was handled or false otherwise. It is safe to keep a
reference to |message| outside of this callback.
Return the handler for browser request events.
Return the handler for browser request events.
Return the handler for off-screen rendering events.
Return the handler for off-screen rendering events.
Return the handler for printing on Linux. If a print handler is not
provided then printing will not be supported on the Linux platform.
Return the handler for printing on Linux. If a print handler is not
provided then printing will not be supported on the Linux platform.
Return the handler for browser load status events.
Return the handler for browser load status events.
Return the handler for browser life span events.
Return the handler for browser life span events.
Return the handler for keyboard events.
Return the handler for keyboard events.
Return the handler for JavaScript dialogs. If no handler is provided the
default implementation will be used.
Return the handler for JavaScript dialogs. If no handler is provided the
default implementation will be used.
Return the handler for permission requests.
Return the handler for permission requests.
Return the handler for events related to CefFrame lifespan. This method
will be called once during CefBrowser creation and the result will be
cached for performance reasons.
Return the handler for events related to CefFrame lifespan. This method
will be called once during CefBrowser creation and the result will be
cached for performance reasons.
Return the handler for focus events.
Return the handler for focus events.
Return the handler for find result events.
Return the handler for find result events.
Return the handler for drag events.
Return the handler for drag events.
Return the handler for download events. If no handler is returned
downloads will not be allowed.
Return the handler for download events. If no handler is returned
downloads will not be allowed.
Return the handler for browser display state events.
Return the handler for browser display state events.
Return the handler for dialogs. If no handler is provided the default
implementation will be used.
Return the handler for dialogs. If no handler is provided the default
implementation will be used.
Return the handler for context menus. If no handler is provided the
default implementation will be used.
Return the handler for context menus. If no handler is provided the
default implementation will be used.
Return the handler for commands. If no handler is provided the default
implementation will be used.
Return the handler for commands. If no handler is provided the default
implementation will be used.
Return the handler for audio rendering events.
Return the handler for audio rendering events.
Implement this interface to provide handler implementations.
Implement this interface to provide handler implementations.
Called on the browser process UI thread when the window.document object of
the main frame has been created.
Called on the browser process UI thread when the render process
terminates unexpectedly. |status| indicates how the process terminated.
|error_code| and |error_string| represent the error that would be
displayed in Chrome's "Aw, Snap!" view. Possible |error_code| values
include cef_resultcode_t non-normal exit values and platform-specific
crash values (for example, a Posix signal or Windows hardware exception).
Called on the browser process UI thread when the render process becomes
responsive after previously being unresponsive. See documentation on
OnRenderProcessUnresponsive.
Called on the browser process UI thread when the render process is
unresponsive as indicated by a lack of input event processing for at
least 15 seconds. Return false for the default behavior which is an
indefinite wait with Alloy style or display of the "Page
unresponsive" dialog with Chrome style. Return true and don't
execute the callback for an indefinite wait without display of the Chrome
style dialog. Return true and call CefUnresponsiveProcessCallback::Wait
either in this method or at a later time to reset the wait timer,
potentially triggering another call to this method if the process remains
unresponsive. Return true and call CefUnresponsiveProcessCallback::
Terminate either in this method or at a later time to terminate the
unresponsive process, resulting in a call to OnRenderProcessTerminated.
OnRenderProcessResponsive will be called if the process becomes responsive
after this method is called. This functionality depends on the hang
monitor which can be disabled by passing the `--disable-hang-monitor`
command-line flag.
Called on the browser process UI thread when the render view associated
with |browser| is ready to receive/handle IPC messages in the render
process.
Called on the UI thread when a client certificate is being requested for
authentication. Return false to use the default behavior. If the
|certificates| list is not empty the default behavior will be to display a
dialog for certificate selection. If the |certificates| list is empty then
the default behavior will be not to show a dialog and it will continue
without using any certificate. Return true and call
CefSelectClientCertificateCallback::Select either in this method or at a
later time to select a certificate. Do not call Select or call it with
NULL to continue without using any certificate. |isProxy| indicates
whether the host is an HTTPS proxy or the origin server. |host| and |port|
contains the hostname and port of the SSL server. |certificates| is the
list of certificates to choose from; this list has already been pruned by
Chromium so that it only contains certificates from issuers that the
server trusts.
Called on the UI thread to handle requests for URLs with an invalid
SSL certificate. Return true and call CefCallback methods either in this
method or at a later time to continue or cancel the request. Return false
to cancel the request immediately. If
cef_settings_t.ignore_certificate_errors is set all invalid certificates
will be accepted without calling this method.
Called on the IO thread when the browser needs credentials from the user.
|origin_url| is the origin making this authentication request. |isProxy|
indicates whether the host is a proxy server. |host| contains the hostname
and |port| contains the port number. |realm| is the realm of the challenge
and may be empty. |scheme| is the authentication scheme used, such as
"basic" or "digest", and will be empty if the source of the request is an
FTP server. Return true to continue the request and call
CefAuthCallback::Continue() either in this method or at a later time when
the authentication information is available. Return false to cancel the
request immediately.
Called on the browser process IO thread before a resource request is
initiated. The |browser| and |frame| values represent the source of the
request. |request| represents the request contents and cannot be modified
in this callback. |is_navigation| will be true if the resource request is
a navigation. |is_download| will be true if the resource request is a
download. |request_initiator| is the origin (scheme + domain) of the page
that initiated the request. Set |disable_default_handling| to true to
disable default handling of the request, in which case it will need to be
handled via CefResourceRequestHandler::GetResourceHandler or it will be
canceled. To allow the resource load to proceed with default handling
return NULL. To specify a handler for the resource return a
CefResourceRequestHandler object. If this callback returns NULL the same
method will be called on the associated CefRequestContextHandler, if any.
Called on the UI thread before OnBeforeBrowse in certain limited cases
where navigating a new or different browser might be desirable. This
includes user-initiated navigation that might open in a special way (e.g.
links clicked via middle-click or ctrl + left-click) and certain types of
cross-origin navigation initiated from the renderer process (e.g.
navigating the top-level frame to/from a file URL). The |browser| and
|frame| values represent the source of the navigation. The
|target_disposition| value indicates where the user intended to navigate
the browser based on standard Chromium behaviors (e.g. current tab,
new tab, etc). The |user_gesture| value will be true if the browser
navigated via explicit user gesture (e.g. clicking a link) or false if it
navigated automatically (e.g. via the DomContentLoaded event). Return true
to cancel the navigation or false to allow the navigation to proceed in
the source browser's top-level frame.
Called on the UI thread before browser navigation. Return true to cancel
the navigation or false to allow the navigation to proceed. The |request|
object cannot be modified in this callback.
CefLoadHandler::OnLoadingStateChange will be called twice in all cases.
If the navigation is allowed CefLoadHandler::OnLoadStart and
CefLoadHandler::OnLoadEnd will be called. If the navigation is canceled
CefLoadHandler::OnLoadError will be called with an |errorCode| value of
ERR_ABORTED. The |user_gesture| value will be true if the browser
navigated via explicit user gesture (e.g. clicking a link) or false if it
navigated automatically (e.g. via the DomContentLoaded event).
Implement this interface to handle events related to browser requests. The
methods of this class will be called on the thread indicated.
Chooses the specified certificate for client certificate authentication.
NULL value means that no client certificate should be used.
Callback interface used to select a client certificate for authentication.
Terminate the unresponsive process.
Reset the timeout for the unresponsive process.
Callback interface for asynchronous handling of an unresponsive process.
Returns true if the certificate status represents an error.
Returns the X.509 certificate.
Returns a bitmask containing any and all problems verifying the server
certificate.
Class representing SSL information.
Called on the IO thread after a resource response is received. The
|browser| and |frame| values represent the source of the request, and may
be NULL for requests originating from service workers or CefURLRequest.
|request| cannot be modified in this callback. Return true if the
specified cookie returned with the response can be saved or false
otherwise.
Called on the IO thread before a resource request is sent. The |browser|
and |frame| values represent the source of the request, and may be NULL
for requests originating from service workers or CefURLRequest. |request|
cannot be modified in this callback. Return true if the specified cookie
can be sent with the request or false otherwise.
Implement this interface to filter cookies that may be sent or received from
resource requests. The methods of this class will be called on the IO thread
unless otherwise indicated.
Called on the IO thread to handle requests for URLs with an unknown
protocol component. The |browser| and |frame| values represent the source
of the request, and may be NULL for requests originating from service
workers or CefURLRequest. |request| cannot be modified in this callback.
Set |allow_os_execution| to true to attempt execution via the registered
OS protocol handler, if any. SECURITY WARNING: YOU SHOULD USE THIS METHOD
TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL ANALYSIS BEFORE
ALLOWING OS EXECUTION.
Called on the IO thread when a resource load has completed. The |browser|
and |frame| values represent the source of the request, and may be NULL
for requests originating from service workers or CefURLRequest. |request|
and |response| represent the request and response respectively and cannot
be modified in this callback. |status| indicates the load completion
status. |received_content_length| is the number of response bytes actually
read. This method will be called for all requests, including requests that
are aborted due to CEF shutdown or destruction of the associated browser.
In cases where the associated browser is destroyed this callback may
arrive after the CefLifeSpanHandler::OnBeforeClose callback for that
browser. The CefFrame::IsValid method can be used to test for this
situation, and care should be taken not to call |browser| or |frame|
methods that modify state (like LoadURL, SendProcessMessage, etc.) if the
frame is invalid.
Called on the IO thread to optionally filter resource response content.
The |browser| and |frame| values represent the source of the request, and
may be NULL for requests originating from service workers or
CefURLRequest. |request| and |response| represent the request and response
respectively and cannot be modified in this callback.
Called on the IO thread when a resource response is received. The
|browser| and |frame| values represent the source of the request, and may
be NULL for requests originating from service workers or CefURLRequest. To
allow the resource load to proceed without modification return false. To
redirect or retry the resource load optionally modify |request| and return
true. Modification of the request URL will be treated as a redirect.
Requests handled using the default network loader cannot be redirected in
this callback. The |response| object cannot be modified in this callback.
WARNING: Redirecting using this method is deprecated. Use
OnBeforeResourceLoad or GetResourceHandler to perform redirects.
Called on the IO thread when a resource load is redirected. The |browser|
and |frame| values represent the source of the request, and may be NULL
for requests originating from service workers or CefURLRequest. The
|request| parameter will contain the old URL and other request-related
information. The |response| parameter will contain the response that
resulted in the redirect. The |new_url| parameter will contain the new URL
and can be changed if desired. The |request| and |response| objects cannot
be modified in this callback.
Called on the IO thread before a resource is loaded. The |browser| and
|frame| values represent the source of the request, and may be NULL for
requests originating from service workers or CefURLRequest. To allow the
resource to load using the default network loader return NULL. To specify
a handler for the resource return a CefResourceHandler object. The
|request| object cannot not be modified in this callback.
Called on the IO thread before a resource request is loaded. The |browser|
and |frame| values represent the source of the request, and may be NULL
for requests originating from service workers or CefURLRequest. To
redirect or change the resource load optionally modify |request|.
Modification of the request URL will be treated as a redirect. Return
RV_CONTINUE to continue the request immediately. Return RV_CONTINUE_ASYNC
and call CefCallback methods at a later time to continue or cancel the
request asynchronously. Return RV_CANCEL to cancel the request
immediately.
Called on the IO thread before a resource request is loaded. The |browser|
and |frame| values represent the source of the request, and may be NULL
for requests originating from service workers or CefURLRequest. To
optionally filter cookies for the request return a CefCookieAccessFilter
object. The |request| object cannot not be modified in this callback.
Implement this interface to handle events related to browser requests. The
methods of this class will be called on the IO thread unless otherwise
indicated.
Called to filter a chunk of data. Expected usage is as follows:
1. Read input data from |data_in| and set |data_in_read| to the number of
bytes that were read up to a maximum of |data_in_size|. |data_in| will
be NULL if |data_in_size| is zero.
2. Write filtered output data to |data_out| and set |data_out_written| to
the number of bytes that were written up to a maximum of
|data_out_size|. If no output data was written then all data must be
read from |data_in| (user must set |data_in_read| = |data_in_size|).
3. Return RESPONSE_FILTER_DONE if all output data was written or
RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending.
This method will be called repeatedly until the input buffer has been
fully read (user sets |data_in_read| = |data_in_size|) and there is no
more input data to filter (the resource response is complete). This method
may then be called an additional time with an empty input buffer if the
user filled the output buffer (set |data_out_written| = |data_out_size|)
and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate that output data
is still pending.
Calls to this method will stop when one of the following conditions is
met:
1. There is no more input data to filter (the resource response is
complete) and the user sets |data_out_written| = 0 or returns
RESPONSE_FILTER_DONE to indicate that all data has been written, or;
2. The user returns RESPONSE_FILTER_ERROR to indicate an error.
Do not keep a reference to the buffers passed to this method.
Initialize the response filter. Will only be called a single time. The
filter will not be installed if this method returns false.
Implement this interface to filter resource response content. The methods of
this class will be called on the browser process IO thread.
Request processing has been canceled.
Read response data. If data is available immediately copy up to
|bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
bytes copied, and return true. To read the data at a later time set
|bytes_read| to 0, return true and call CefCallback::Continue() when the
data is available. To indicate response completion return false.
WARNING: This method is deprecated. Use Skip and Read instead.
Retrieve response header information. If the response length is not known
set |response_length| to -1 and ReadResponse() will be called until it
returns false. If the response length is known set |response_length|
to a positive value and ReadResponse() will be called until it returns
false or the specified number of bytes have been read. Use the |response|
object to set the mime type, http status code and other optional header
values. To redirect the request to a new URL set |redirectUrl| to the new
URL. |redirectUrl| can be either a relative or fully qualified URL.
It is also possible to set |response| to a redirect http status code
and pass the new URL via a Location header. Likewise with |redirectUrl| it
is valid to set a relative or fully qualified URL as the Location header
value. If an error occured while setting up the request you can call
SetError() on |response| to indicate the error condition.
Begin processing the request. To handle the request return true and call
CefCallback::Continue() once the response header information is available
(CefCallback::Continue() can also be called from inside this method if
header information is available immediately). To cancel the request return
false.
WARNING: This method is deprecated. Use Open instead.
Open the response stream. To handle the request immediately set
|handle_request| to true and return true. To decide at a later time set
|handle_request| to false, return true, and execute |callback| to continue
or cancel the request. To cancel the request immediately set
|handle_request| to true and return false. This method will be called in
sequence but not from a dedicated thread. For backwards compatibility set
|handle_request| to false and return false and the ProcessRequest method
will be called.
Class used to implement a custom request handler interface. The methods of
this class will be called on the IO thread unless otherwise indicated.
Callback for asynchronous continuation of CefResourceHandler::Read().
Callback for asynchronous continuation of CefResourceHandler::Skip().
Cancel the authentication request.
Cancel the authentication request.
Continue the authentication request.
Continue the authentication request.
Callback interface used for asynchronous continuation of authentication
requests.
Callback interface used for asynchronous continuation of authentication
requests.
Called when an on-screen keyboard should be shown or hidden for the
specified |browser|. |input_mode| specifies what kind of keyboard
should be opened. If |input_mode| is CEF_TEXT_INPUT_MODE_NONE, any
existing keyboard for this browser should be hidden.
Called when text selection has changed for the specified |browser|.
|selected_text| is the currently selected text and |selected_range| is
the character range.
Called when the IME composition range has changed. |selected_range| is the
range of characters that have been selected. |character_bounds| is the
bounds of each character in view coordinates.
Called when the scroll offset has changed.
Called when the user starts dragging content in the web view. Contextual
information about the dragged content is supplied by |drag_data|.
(|x|, |y|) is the drag start location in screen coordinates.
OS APIs that run a system message loop may be used within the
StartDragging call.
Return false to abort the drag operation. Don't call any of
CefBrowserHost::DragSource*Ended* methods after returning false.
Return true to handle the drag operation. Call
CefBrowserHost::DragSourceEndedAt and DragSourceSystemDragEnded either
synchronously or asynchronously to inform the web view that the drag
operation has ended.
Called when touch handle state is updated. The client is responsible for
rendering the touch handles.
Called to retrieve the size of the touch handle for the specified
|orientation|.
Called when an element has been rendered to the shared texture handle.
|type| indicates whether the element is the view or the popup widget.
|dirtyRects| contains the set of rectangles in pixel coordinates that need
to be repainted. |info| contains the shared handle; on Windows it is a
HANDLE to a texture that can be opened with D3D11 OpenSharedResource, on
macOS it is an IOSurface pointer that can be opened with Metal or OpenGL,
and on Linux it contains several planes, each with an fd to the underlying
system native buffer.
The underlying implementation uses a pool to deliver frames. As a result,
the handle may differ every frame depending on how many frames are
in-progress. The handle's resource cannot be cached and cannot be accessed
outside of this callback. It should be reopened each time this callback is
executed and the contents should be copied to a texture owned by the
client application. The contents of |info| will be released back to the
pool after this callback returns.
Called when an element should be painted. Pixel values passed to this
method are scaled relative to view coordinates based on the value of
CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type|
indicates whether the element is the view or the popup widget. |buffer|
contains the pixel data for the whole image. |dirtyRects| contains the set
of rectangles in pixel coordinates that need to be repainted. |buffer|
will be |width|*|height|*4 bytes in size and represents a BGRA image with
an upper-left origin. This method is only called when
CefWindowInfo::shared_texture_enabled is set to false.
Called when the browser wants to move or resize the popup widget. |rect|
contains the new location and size in view coordinates.
Called when the browser wants to show or hide the popup widget. The popup
should be shown if |show| is true and hidden if |show| is false.
Called to allow the client to fill in the CefScreenInfo object with
appropriate values. Return true if the |screen_info| structure has been
modified.
If the screen info rectangle is left empty the rectangle from GetViewRect
will be used. If the rectangle is still empty or invalid popups may not be
drawn correctly.
Called to retrieve the translation from view DIP coordinates to screen
coordinates. Windows/Linux should provide screen device (pixel)
coordinates and MacOS should provide screen DIP coordinates. Return true
if the requested coordinates were provided.
Called to retrieve the view rectangle in screen DIP coordinates. This
method must always provide a non-empty rectangle.
Called to retrieve the root window rectangle in screen DIP coordinates.
Return true if the rectangle was provided. If this method returns false
the rectangle from GetViewRect will be used.
Return the handler for accessibility notifications. If no handler is
provided the default implementation will be used.
Implement this interface to handle events when window rendering is disabled.
The methods of this class will be called on the UI thread.
Called after renderer process sends accessibility location changes to the
browser process.
Called after renderer process sends accessibility tree changes to the
browser process.
Implement this interface to receive accessibility notification when
accessibility events have been registered. The methods of this class will
be called on the UI thread.
Return the PDF paper size in device units. Used in combination with
CefBrowserHost::PrintToPDF().
Reset client state related to printing.
Send the print job to the printer. Execute |callback| once the job is
completed. Return true if the job will proceed or false to cancel the job
immediately.
Show the print dialog. Execute |callback| once the dialog is dismissed.
Return true if the dialog will be displayed or false to cancel the
printing immediately.
Synchronize |settings| with client state. If |get_defaults| is true then
populate |settings| with the default print settings. Do not keep a
reference to |settings| outside of this callback.
Called when printing has started for the specified |browser|. This method
will be called before the other OnPrint*() methods and irrespective of how
printing was initiated (e.g. CefBrowserHost::Print(), JavaScript
window.print() or PDF extension print button).
Implement this interface to handle printing on Linux. Each browser will have
only one print job in progress at a time. The methods of this class will be
called on the browser process UI thread.
Indicate completion of the print job.
Callback interface for asynchronous continuation of print job requests.
Cancel the printing.
Continue printing with the specified |settings|.
Callback interface for asynchronous continuation of print dialog requests.
Get the duplex mode.
Set the duplex mode.
Get the number of copies.
Set the number of copies.
Get the color model.
Set the color model.
Returns true if pages will be collated.
Set whether pages will be collated.
Returns true if only the selection will be printed.
Set whether only the selection will be printed.
Retrieve the page ranges.
Returns the number of page ranges that currently exist.
Set the page ranges.
Get the DPI (dots per inch).
Set the DPI (dots per inch).
Get the device name.
Set the device name.
Set the printer printable area in device units.
Some platforms already provide flipped area. Set |landscape_needs_flip|
to false on those platforms to avoid double flipping.
Returns true if the orientation is landscape.
Set the page orientation.
Returns true if the values of this object are read-only. Some APIs may
expose read-only objects.
Returns true if this object is valid. Do not call any other methods if
this function returns false.
Create a new CefPrintSettings object.
Class representing print settings.
Called when a permission prompt handled via OnShowPermissionPrompt is
dismissed. |prompt_id| will match the value that was passed to
OnShowPermissionPrompt. |result| will be the value passed to
CefPermissionPromptCallback::Continue or CEF_PERMISSION_RESULT_IGNORE if
the dialog was dismissed for other reasons such as navigation, browser
closure, etc. This method will not be called if OnShowPermissionPrompt
returned false for |prompt_id|.
Called when a page should show a permission prompt. |prompt_id| uniquely
identifies the prompt. |requesting_origin| is the URL origin requesting
permission. |requested_permissions| is a combination of values from
cef_permission_request_types_t that represent the requested permissions.
Return true and call CefPermissionPromptCallback::Continue either in this
method or at a later time to continue or cancel the request. Return false
to proceed with default handling. With Chrome style, default handling will
display the permission prompt UI. With Alloy style, default handling is
CEF_PERMISSION_RESULT_IGNORE.
Called when a page requests permission to access media.
|requesting_origin| is the URL origin requesting permission.
|requested_permissions| is a combination of values from
cef_media_access_permission_types_t that represent the requested
permissions. Return true and call CefMediaAccessCallback methods either in
this method or at a later time to continue or cancel the request. Return
false to proceed with default handling. With Chrome style, default
handling will display the permission request UI. With Alloy style,
default handling will deny the request. This method will not be called if
the "--enable-media-stream" command-line switch is used to grant all
permissions.
Implement this interface to handle events related to permission requests.
The methods of this class will be called on the browser process UI thread.
Complete the permissions request with the specified |result|.
Callback interface used for asynchronous continuation of permission prompts.
Cancel the media access request.
Call to allow or deny media access. If this callback was initiated in
response to a getUserMedia (indicated by
CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE and/or
CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE being set) then
|allowed_permissions| must match |required_permissions| passed to
OnRequestMediaAccessPermission.
Callback interface used for asynchronous continuation of media access
permission requests.
Called when a navigation fails or is canceled. This method may be called
by itself if before commit or in combination with OnLoadStart/OnLoadEnd if
after commit. |errorCode| is the error code number, |errorText| is the
error text and |failedUrl| is the URL that failed to load.
See net\base\net_error_list.h for complete descriptions of the error
codes.
Called when the browser is done loading a frame. The |frame| value will
never be empty -- call the IsMain() method to check if this frame is the
main frame. Multiple frames may be loading at the same time. Sub-frames
may start or continue loading after the main frame load has ended. This
method will not be called for same page navigations (fragments, history
state, etc.) or for navigations that fail or are canceled before commit.
For notification of overall browser load status use OnLoadingStateChange
instead.
Called after a navigation has been committed and before the browser begins
loading contents in the frame. The |frame| value will never be empty --
call the IsMain() method to check if this frame is the main frame.
|transition_type| provides information about the source of the navigation
and an accurate value is only available in the browser process. Multiple
frames may be loading at the same time. Sub-frames may start or continue
loading after the main frame load has ended. This method will not be
called for same page navigations (fragments, history state, etc.) or for
navigations that fail or are canceled before commit. For notification of
overall browser load status use OnLoadingStateChange instead.
Called when the loading state has changed. This callback will be executed
twice -- once when loading is initiated either programmatically or by user
action, and once when loading is terminated due to completion,
cancellation of failure. It will be called before any calls to OnLoadStart
and after all calls to OnLoadError and/or OnLoadEnd.
Implement this interface to handle events related to browser load status.
The methods of this class will be called on the browser process UI thread or
render process main thread (TID_RENDERER).
Called just before a browser is destroyed. Release all references to the
browser object and do not attempt to execute any methods on the browser
object (other than IsValid, GetIdentifier or IsSame) after this callback
returns. CefFrameHandler callbacks related to final main frame
destruction, and OnBeforePopupAborted callbacks for any pending popups,
will arrive after this callback and CefBrowser::IsValid will return false
at that time. Any in-progress network requests associated with |browser|
will be aborted when the browser is destroyed, and
CefResourceRequestHandler callbacks related to those requests may still
arrive on the IO thread after this callback. See CefFrameHandler and
DoClose() documentation for additional usage information.
Called when an Alloy style browser is ready to be closed, meaning that the
close has already been initiated and that JavaScript unload handlers have
already executed or should be ignored. This may result directly from a
call to CefBrowserHost::[Try]CloseBrowser() or indirectly if the browser's
top-level parent window was created by CEF and the user attempts to
close that window (by clicking the 'X', for example). DoClose() will not
be called if the browser's host window/view has already been destroyed
(via parent window/view hierarchy tear-down, for example), as it is no
longer possible to customize the close behavior at that point.
An application should handle top-level parent window close notifications
by calling CefBrowserHost::TryCloseBrowser() or
CefBrowserHost::CloseBrowser(false) instead of allowing the window to
close immediately (see the examples below). This gives CEF an opportunity
to process JavaScript unload handlers and optionally cancel the close
before DoClose() is called.
When windowed rendering is enabled CEF will create an internal child
window/view to host the browser. In that case returning false from
DoClose() will send the standard close notification to the browser's
top-level parent window (e.g. WM_CLOSE on Windows, performClose: on OS X,
"delete_event" on Linux or CefWindowDelegate::CanClose() callback from
Views).
When windowed rendering is disabled there is no internal window/view
and returning false from DoClose() will cause the browser object to be
destroyed immediately.
If the browser's top-level parent window requires a non-standard close
notification then send that notification from DoClose() and return true.
You are still required to complete the browser close as soon as possible
(either by calling [Try]CloseBrowser() or by proceeding with window/view
hierarchy tear-down), otherwise the browser will be left in a partially
closed state that interferes with proper functioning. Top-level windows
created on the browser process UI thread can alternately call
CefBrowserHost::IsReadyToBeClosed() in the close handler to check close
status instead of relying on custom DoClose() handling. See documentation
on that method for additional details.
The CefLifeSpanHandler::OnBeforeClose() method will be called after
DoClose() (if DoClose() is called) and immediately before the browser
object is destroyed. The application should only exit after
OnBeforeClose() has been called for all existing browsers.
The below examples describe what should happen during window close when
the browser is parented to an application-provided top-level window.
Example 1: Using CefBrowserHost::TryCloseBrowser(). This is recommended
for clients using standard close handling and windows created on the
browser process UI thread.
1. User clicks the window close button which sends a close notification
to the application's top-level window.
2. Application's top-level window receives the close notification and
calls TryCloseBrowser() (similar to calling CloseBrowser(false)).
TryCloseBrowser() returns false so the client cancels the window
close.
3. JavaScript 'onbeforeunload' handler executes and shows the close
confirmation dialog (which can be overridden via
CefJSDialogHandler::OnBeforeUnloadDialog()).
4. User approves the close.
5. JavaScript 'onunload' handler executes.
6. Application's DoClose() handler is called and returns false by
default.
7. CEF sends a close notification to the application's top-level window
(because DoClose() returned false).
8. Application's top-level window receives the close notification and
calls TryCloseBrowser(). TryCloseBrowser() returns true so the client
allows the window close.
9. Application's top-level window is destroyed, triggering destruction
of the child browser window.
10. Application's OnBeforeClose() handler is called and the browser object
is destroyed.
11. Application exits by calling CefQuitMessageLoop() if no other browsers
exist.
Example 2: Using CefBrowserHost::CloseBrowser(false) and implementing the
DoClose() callback. This is recommended for clients using non-standard
close handling or windows that were not created on the browser process UI
thread.
1. User clicks the window close button which sends a close notification
to the application's top-level window.
2. Application's top-level window receives the close notification and:
A. Calls CefBrowserHost::CloseBrowser(false).
B. Cancels the window close.
3. JavaScript 'onbeforeunload' handler executes and shows the close
confirmation dialog (which can be overridden via
CefJSDialogHandler::OnBeforeUnloadDialog()).
4. User approves the close.
5. JavaScript 'onunload' handler executes.
6. Application's DoClose() handler is called. Application will:
A. Set a flag to indicate that the next top-level window close attempt
will be allowed.
B. Return false.
7. CEF sends a close notification to the application's top-level window
(because DoClose() returned false).
8. Application's top-level window receives the close notification and
allows the window to close based on the flag from #6A.
9. Application's top-level window is destroyed, triggering destruction
of the child browser window.
10. Application's OnBeforeClose() handler is called and the browser object
is destroyed.
11. Application exits by calling CefQuitMessageLoop() if no other browsers
exist.
Called after a new browser is created. It is now safe to begin performing
actions with |browser|. CefFrameHandler callbacks related to initial main
frame creation will arrive before this callback. See CefFrameHandler
documentation for additional usage information.
Called on the UI thread before a new DevTools popup browser is created.
The |browser| value represents the source of the popup request. Optionally
modify |windowInfo|, |client|, |settings| and |extra_info| values. The
|client|, |settings| and |extra_info| values will default to the source
browser's values. Any modifications to |windowInfo| will be ignored if the
parent browser is Views-hosted (wrapped in a CefBrowserView).
The |extra_info| parameter provides an opportunity to specify extra
information specific to the created popup browser that will be passed to
CefRenderProcessHandler::OnBrowserCreated() in the render process. The
existing |extra_info| object, if any, will be read-only but may be
replaced with a new object.
Views-hosted source browsers will create Views-hosted DevTools popups
unless |use_default_window| is set to to true. DevTools popups can be
blocked by returning true from CefCommandHandler::OnChromeCommand for
IDC_DEV_TOOLS. Only used with Chrome style.
Called on the UI thread if a new popup browser is aborted. This only
occurs if the popup is allowed in OnBeforePopup and creation fails before
OnAfterCreated is called for the new popup browser. The |browser| value is
the source of the popup request (opener browser). The |popup_id| value
uniquely identifies the popup in the context of the opener browser, and is
the same value that was passed to OnBeforePopup.
Any client state associated with pending popups should be cleared in
OnBeforePopupAborted, OnAfterCreated of the popup browser, or
OnBeforeClose of the opener browser. OnBeforeClose of the opener browser
may be called before this method in cases where the opener is closing
during popup creation, in which case CefBrowserHost::IsValid will return
false in this method.
Called on the UI thread before a new popup browser is created. The
|browser| and |frame| values represent the source of the popup request
(opener browser and frame). The |popup_id| value uniquely identifies the
popup in the context of the opener browser. The |target_url| and
|target_frame_name| values indicate where the popup browser should
navigate and may be empty if not specified with the request. The
|target_disposition| value indicates where the user intended to open the
popup (e.g. current tab, new tab, etc). The |user_gesture| value will be
true if the popup was opened via explicit user gesture (e.g. clicking a
link) or false if the popup opened automatically (e.g. via the
DomContentLoaded event). The |popupFeatures| structure contains additional
information about the requested popup window. To allow creation of the
popup browser optionally modify |windowInfo|, |client|, |settings| and
|no_javascript_access| and return false. To cancel creation of the popup
browser return true. The |client| and |settings| values will default to
the source browser's values. If the |no_javascript_access| value is set to
false the new browser will not be scriptable and may not be hosted in the
same renderer process as the source browser. Any modifications to
|windowInfo| will be ignored if the parent browser is wrapped in a
CefBrowserView. The |extra_info| parameter provides an opportunity to
specify extra information specific to the created popup browser that will
be passed to CefRenderProcessHandler::OnBrowserCreated() in the render
process.
If popup browser creation succeeds then OnAfterCreated will be called for
the new popup browser. If popup browser creation fails, and if the opener
browser has not yet been destroyed, then OnBeforePopupAborted will be
called for the opener browser. See OnBeforePopupAborted documentation for
additional details.
Implement this interface to handle events related to browser life span. The
methods of this class will be called on the UI thread unless otherwise
indicated.
Called after the renderer and JavaScript in the page has had a chance to
handle the event. |event| contains information about the keyboard event.
|os_event| is the operating system event message, if any. Return true if
the keyboard event was handled or false otherwise.
Called before a keyboard event is sent to the renderer. |event| contains
information about the keyboard event. |os_event| is the operating system
event message, if any. Return true if the event was handled or false
otherwise. If the event will be handled in OnKeyEvent() as a keyboard
shortcut set |is_keyboard_shortcut| to true and return false.
Implement this interface to handle events related to keyboard input. The
methods of this class will be called on the UI thread.
Called when the dialog is closed.
Called to cancel any pending dialogs and reset any saved dialog state.
Will be called due to events like page navigation irregardless of whether
any dialogs are currently pending.
Called to run a dialog asking the user if they want to leave a page.
Return false to use the default dialog implementation. Return true if the
application will use a custom dialog or if the callback has been executed
immediately. Custom dialogs may be either modal or modeless. If a custom
dialog is used the application must execute |callback| once the custom
dialog is dismissed.
Called to run a JavaScript dialog. If |origin_url| is non-empty it can be
passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure
and user-friendly display string. The |default_prompt_text| value will be
specified for prompt dialogs only. Set |suppress_message| to true and
return false to suppress the message (suppressing messages is preferable
to immediately executing the callback as this is used to detect presumably
malicious behavior like spamming alert messages in onbeforeunload). Set
|suppress_message| to false and return false to use the default
implementation (the default implementation will show one modal dialog at a
time and suppress any additional dialog requests until the displayed
dialog is dismissed). Return true if the application will use a custom
dialog or if the callback has been executed immediately. Custom dialogs
may be either modal or modeless. If a custom dialog is used the
application must execute |callback| once the custom dialog is dismissed.
Implement this interface to handle events related to JavaScript dialogs. The
methods of this class will be called on the UI thread.
Continue the JS dialog request. Set |success| to true if the OK button was
pressed. The |user_input| value should be specified for prompt dialogs.
Callback interface used for asynchronous continuation of JavaScript dialog
requests.
Called when the main frame changes due to (a) initial browser creation,
(b) final browser destruction, (c) cross-origin navigation or (d)
re-navigation after renderer process termination (due to crashes, etc).
|old_frame| will be NULL and |new_frame| will be non-NULL when a main
frame is assigned to |browser| for the first time. |old_frame| will be
non-NULL and |new_frame| will be NULL when a main frame is removed from
|browser| for the last time. Both |old_frame| and |new_frame| will be
non-NULL for cross-origin navigations or re-navigation after renderer
process termination. This method will be called after OnFrameCreated() for
|new_frame| and/or after OnFrameDestroyed() for |old_frame|. If called
during browser destruction and after CefLifeSpanHandler::OnBeforeClose()
then CefBrowser::IsValid() will return false for |browser|.
Called when a frame loses its connection to the renderer process. This may
occur when a frame is destroyed, enters the BackForwardCache, or
encounters a rare connection error. In the case of frame destruction this
call will be followed by a (potentially async) call to OnFrameDestroyed.
If frame destruction is occuring synchronously then CefFrame::IsValid()
will return false for |frame|. If called during browser destruction and
after CefLifeSpanHandler::OnBeforeClose() then CefBrowser::IsValid() will
return false for |browser|. If, in the non-destruction case, the same
frame later exits the BackForwardCache or recovers from a connection error
then there will be a follow-up call to OnFrameAttached. This method will
not be called for temporary frames created during cross-origin navigation.
Called when a frame can begin routing commands to/from the associated
renderer process. |reattached| will be true if the frame was re-attached
after exiting the BackForwardCache or after encountering a recoverable
connection error. Any queued commands will now have been dispatched. This
method will not be called for temporary frames created during cross-origin
navigation.
Called when an existing frame is destroyed. This will be the last
notification that references |frame| and CefFrame::IsValid() will return
false for |frame|. If called during browser destruction and after
CefLifeSpanHandler::OnBeforeClose() then CefBrowser::IsValid() will return
false for |browser|. Any queued commands that have not been sent will be
discarded before this callback.
Called when a new frame is created. This will be the first notification
that references |frame|. Any commands that require transport to the
associated renderer process (LoadRequest, SendProcessMessage, GetSource,
etc.) will be queued. The queued commands will be sent before
OnFrameAttached or discarded before OnFrameDestroyed if the frame never
attaches.
Implement this interface to handle events related to CefFrame life span. The
order of callbacks is:
(1) During initial CefBrowserHost creation and navigation of the main frame:
- CefFrameHandler::OnFrameCreated => The initial main frame object has been
created. Any commands will be queued until the frame is attached.
- CefFrameHandler::OnMainFrameChanged => The initial main frame object has
been assigned to the browser.
- CefLifeSpanHandler::OnAfterCreated => The browser is now valid and can be
used.
- CefFrameHandler::OnFrameAttached => The initial main frame object is now
connected to its peer in the renderer process. Commands can be routed.
(2) During further CefBrowserHost navigation/loading of the main frame
and/or sub-frames:
- CefFrameHandler::OnFrameCreated => A new main frame or sub-frame object
has been created. Any commands will be queued until the frame is attached.
- CefFrameHandler::OnFrameAttached => A new main frame or sub-frame object
is now connected to its peer in the renderer process. Commands can be
routed.
- CefFrameHandler::OnFrameDetached => An existing main frame or sub-frame
object has lost its connection to the renderer process. If multiple
objects are detached at the same time then notifications will be sent for
any sub-frame objects before the main frame object. Commands can no longer
be routed and will be discarded.
- CefFremeHadler::OnFrameDestroyed => An existing main frame or sub-frame
object has been destroyed.
- CefFrameHandler::OnMainFrameChanged => A new main frame object has been
assigned to the browser. This will only occur with cross-origin navigation
or re-navigation after renderer process termination (due to crashes, etc).
(3) During final CefBrowserHost destruction of the main frame:
- CefFrameHandler::OnFrameDetached => Any sub-frame objects have lost their
connection to the renderer process. Commands can no longer be routed and
will be discarded.
- CefFreameHandler::OnFrameDestroyed => Any sub-frame objects have been
destroyed.
- CefLifeSpanHandler::OnBeforeClose => The browser has been destroyed.
- CefFrameHandler::OnFrameDetached => The main frame object have lost its
connection to the renderer process. Notifications will be sent for any
sub-frame objects before the main frame object. Commands can no longer be
routed and will be discarded.
- CefFreameHandler::OnFrameDestroyed => The main frame object has been
destroyed.
- CefFrameHandler::OnMainFrameChanged => The final main frame object has
been removed from the browser.
Special handling applies for cross-origin loading on creation/navigation of
sub-frames, and cross-origin loading on creation of new popup browsers. A
temporary frame will first be created in the parent frame's renderer
process. This temporary frame will never attach and will be discarded after
the real cross-origin frame is created in the new/target renderer process.
The client will receive creation callbacks for the temporary frame, followed
by cross-origin navigation callbacks (2) for the transition from the
temporary frame to the real frame. The temporary frame will not receive or
execute commands during this transitional period (any sent commands will be
discarded).
When the main frame navigates to a different origin the OnMainFrameChanged
callback (2) will be executed with the old and new main frame objects.
Callbacks will not be executed for placeholders that may be created during
pre-commit navigation for sub-frames that do not yet exist in the renderer
process. Placeholders will have CefFrame::GetIdentifier() == -4.
The methods of this class will be called on the UI thread unless otherwise
indicated.
Called when the browser component has received focus.
Called when the browser component is requesting focus. |source| indicates
where the focus request is originating from. Return false to allow the
focus to be set or true to cancel setting the focus.
Called when the browser component is about to loose focus. For instance,
if focus was on the last HTML element and the user pressed the TAB key.
|next| will be true if the browser is giving focus to the next component
and false if the browser is giving focus to the previous component.
Implement this interface to handle events related to focus. The methods of
this class will be called on the UI thread.
Called to report find results returned by CefBrowserHost::Find().
|identifer| is a unique incremental identifier for the currently active
search, |count| is the number of matches currently identified,
|selectionRect| is the location of where the match was found (in window
coordinates), |activeMatchOrdinal| is the current position in the search
results, and |finalUpdate| is true if this is the last find notification.
Implement this interface to handle events related to find results. The
methods of this class will be called on the UI thread.
Called whenever draggable regions for the browser window change. These can
be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If
draggable regions are never defined in a document this method will also
never be called. If the last draggable region is removed from a document
this method will be called with an empty vector.
Called when an external drag event enters the browser window. |dragData|
contains the drag event data and |mask| represents the type of drag
operation. Return false for default drag handling behavior or true to
cancel the drag event.
Implement this interface to handle events related to dragging. The methods
of this class will be called on the UI thread.
Called when a download's status or progress information has been updated.
This may be called multiple times before and after OnBeforeDownload().
Execute |callback| either asynchronously or in this method to cancel the
download if desired. Do not keep a reference to |download_item| outside of
this method.
Called before a download begins. |suggested_name| is the suggested name
for the download file. Return true and execute |callback| either
asynchronously or in this method to continue or cancel the download.
Return false to proceed with default handling (cancel with Alloy style,
download shelf with Chrome style). Do not keep a reference to
|download_item| outside of this method.
Called before a download begins in response to a user-initiated action
(e.g. alt + link click or link click that returns a `Content-Disposition:
attachment` response from the server). |url| is the target download URL
and |request_method| is the target method (GET, POST, etc). Return true to
proceed with the download or false to cancel the download.
Class used to handle file downloads. The methods of this class will called
on the browser process UI thread.
Call to resume the download.
Call to pause the download.
Call to cancel the download.
Callback interface used to asynchronously cancel a download.
Call to continue the download. Set |download_path| to the full file path
for the download including the file name or leave blank to use the
suggested name and the default temp directory. Set |show_dialog| to true
if you do wish to show the default "Save As" dialog.
Callback interface used to asynchronously continue a download.
Called when the browser's access to an audio and/or video source has
changed.
Called when the browser's cursor has changed. If |type| is CT_CUSTOM then
|custom_cursor_info| will be populated with the custom cursor information.
Return true if the cursor change was handled or false for default
handling.
Called when the overall page loading progress has changed. |progress|
ranges from 0.0 to 1.0.
Called when auto-resize is enabled via
CefBrowserHost::SetAutoResizeEnabled and the contents have auto-resized.
|new_size| will be the desired size in view coordinates. Return true if
the resize was handled or false for default handling.
Called to display a console message. Return true to stop the message from
being output to the console.
Called when the browser receives a status message. |value| contains the
text that will be displayed in the status message.
Called when the browser is about to display a tooltip. |text| contains the
text that will be displayed in the tooltip. To handle the display of the
tooltip yourself return true. Otherwise, you can optionally modify |text|
and then return false to allow the browser to display the tooltip.
When window rendering is disabled the application is responsible for
drawing tooltips and the return value is ignored.
Called when web content in the page has toggled fullscreen mode. If
|fullscreen| is true the content will automatically be sized to fill the
browser content area. If |fullscreen| is false the content will
automatically return to its original size and position. With Alloy style
the client is responsible for triggering the fullscreen transition (for
example, by calling CefWindow::SetFullscreen when using Views). With
Chrome style the fullscreen transition will be triggered automatically.
The CefWindowDelegate::OnWindowFullscreenTransition method will be called
during the fullscreen transition for notification purposes.
Called when the page icon changes.
Called when the page title changes.
Called when a frame's address has changed.
Implement this interface to handle events related to browser display state.
The methods of this class will be called on the UI thread.
Called to run a file chooser dialog. |mode| represents the type of dialog
to display. |title| to the title to be used for the dialog and may be
empty to show the default title ("Open" or "Save" depending on the mode).
|default_file_path| is the path with optional directory and/or file name
component that should be initially selected in the dialog.
|accept_filters| are used to restrict the selectable file types and may be
any combination of valid lower-cased MIME types (e.g. "text/*" or
"image/*") and individual file extensions (e.g. ".txt" or ".png").
|accept_extensions| provides the semicolon-delimited expansion of MIME
types to file extensions (if known, or empty string otherwise).
|accept_descriptions| provides the descriptions for MIME types (if known,
or empty string otherwise). For example, the "image/*" mime type might
have extensions ".png;.jpg;.bmp;..." and description "Image Files".
|accept_filters|, |accept_extensions| and |accept_descriptions| will all
be the same size. To display a custom dialog return true and execute
|callback| either inline or at a later time. To display the default dialog
return false. If this method returns false it may be called an additional
time for the same dialog (both before and after MIME type expansion).
Implement this interface to handle dialog events. The methods of this class
will be called on the browser process UI thread.
Cancel the file selection.
Continue the file selection. |file_paths| should be a single value or a
list of values depending on the dialog mode. An empty |file_paths| value
is treated the same as calling Cancel().
Callback interface for asynchronous continuation of file dialog requests.
Returns true if the context menu contains items specified by the renderer
process.
Returns true if the context menu contains items specified by the renderer
process.
Returns flags representing the actions supported by the editable node, if
any, that the context menu was invoked on.
Returns flags representing the actions supported by the editable node, if
any, that the context menu was invoked on.
Returns true if the context menu was invoked on an editable node where
spell-check is enabled.
Returns true if the context menu was invoked on an editable node where
spell-check is enabled.
Returns true if the context menu was invoked on an editable node.
Returns true if the context menu was invoked on an editable node.
Returns true if suggestions exist, false otherwise. Fills in |suggestions|
from the spell check service for the misspelled word if there is one.
Returns true if suggestions exist, false otherwise. Fills in |suggestions|
from the spell check service for the misspelled word if there is one.
Returns the text of the misspelled word, if any, that the context menu was
invoked on.
Returns the text of the misspelled word, if any, that the context menu was
invoked on.
Returns the text of the selection, if any, that the context menu was
invoked on.
Returns the text of the selection, if any, that the context menu was
invoked on.
Returns flags representing the actions supported by the media element, if
any, that the context menu was invoked on.
Returns flags representing the actions supported by the media element, if
any, that the context menu was invoked on.
Returns the type of context node that the context menu was invoked on.
Returns the type of context node that the context menu was invoked on.
Returns the character encoding of the subframe that the context menu was
invoked on.
Returns the character encoding of the subframe that the context menu was
invoked on.
Returns the URL of the subframe that the context menu was invoked on.
Returns the URL of the subframe that the context menu was invoked on.
Returns the URL of the top level page that the context menu was invoked
on.
Returns the URL of the top level page that the context menu was invoked
on.
Returns the title text or the alt text if the context menu was invoked on
an image.
Returns the title text or the alt text if the context menu was invoked on
an image.
Returns true if the context menu was invoked on an image which has
non-empty contents.
Returns true if the context menu was invoked on an image which has
non-empty contents.
Returns the source URL, if any, for the element that the context menu was
invoked on. Example of elements with source URLs are img, audio, and
video.
Returns the source URL, if any, for the element that the context menu was
invoked on. Example of elements with source URLs are img, audio, and
video.
Returns the link URL, if any, to be used ONLY for "copy link address". We
don't validate this field in the frontend process.
Returns the link URL, if any, to be used ONLY for "copy link address". We
don't validate this field in the frontend process.
Returns the URL of the link, if any, that encloses the node that the
context menu was invoked on.
Returns the URL of the link, if any, that encloses the node that the
context menu was invoked on.
Returns flags representing the type of node that the context menu was
invoked on.
Returns flags representing the type of node that the context menu was
invoked on.
Returns the Y coordinate of the mouse where the context menu was invoked.
Coords are relative to the associated RenderView's origin.
Returns the Y coordinate of the mouse where the context menu was invoked.
Coords are relative to the associated RenderView's origin.
Returns the X coordinate of the mouse where the context menu was invoked.
Coords are relative to the associated RenderView's origin.
Returns the X coordinate of the mouse where the context menu was invoked.
Coords are relative to the associated RenderView's origin.
Provides information about the context menu state. The methods of this class
can only be accessed on browser process the UI thread.
Provides information about the context menu state. The methods of this class
can only be accessed on browser process the UI thread.
Called when the quick menu for a windowless browser is dismissed
irregardless of whether the menu was canceled or a command was selected.
Called when the quick menu for a windowless browser is dismissed
irregardless of whether the menu was canceled or a command was selected.
Called to execute a command selected from the quick menu for a windowless
browser. Return true if the command was handled or false for the default
implementation. See cef_menu_id_t for command IDs that have default
implementations.
Called to execute a command selected from the quick menu for a windowless
browser. Return true if the command was handled or false for the default
implementation. See cef_menu_id_t for command IDs that have default
implementations.
Called to allow custom display of the quick menu for a windowless browser.
|location| is the top left corner of the selected region. |size| is the
size of the selected region. |edit_state_flags| is a combination of flags
that represent the state of the quick menu. Return true if the menu will
be handled and execute |callback| either synchronously or asynchronously
with the selected command ID. Return false to cancel the menu.
Called to allow custom display of the quick menu for a windowless browser.
|location| is the top left corner of the selected region. |size| is the
size of the selected region. |edit_state_flags| is a combination of flags
that represent the state of the quick menu. Return true if the menu will
be handled and execute |callback| either synchronously or asynchronously
with the selected command ID. Return false to cancel the menu.
Called when the context menu is dismissed irregardless of whether the menu
was canceled or a command was selected.
Called when the context menu is dismissed irregardless of whether the menu
was canceled or a command was selected.
Called to execute a command selected from the context menu. Return true if
the command was handled or false for the default implementation. See
cef_menu_id_t for the command ids that have default implementations. All
user-defined command ids should be between MENU_ID_USER_FIRST and
MENU_ID_USER_LAST. |params| will have the same values as what was passed
to OnBeforeContextMenu(). Do not keep a reference to |params| outside of
this callback.
Called to execute a command selected from the context menu. Return true if
the command was handled or false for the default implementation. See
cef_menu_id_t for the command ids that have default implementations. All
user-defined command ids should be between MENU_ID_USER_FIRST and
MENU_ID_USER_LAST. |params| will have the same values as what was passed
to OnBeforeContextMenu(). Do not keep a reference to |params| outside of
this callback.
Called to allow custom display of the context menu. |params| provides
information about the context menu state. |model| contains the context
menu model resulting from OnBeforeContextMenu. For custom display return
true and execute |callback| either synchronously or asynchronously with
the selected command ID. For default display return false. Do not keep
references to |params| or |model| outside of this callback.
Called to allow custom display of the context menu. |params| provides
information about the context menu state. |model| contains the context
menu model resulting from OnBeforeContextMenu. For custom display return
true and execute |callback| either synchronously or asynchronously with
the selected command ID. For default display return false. Do not keep
references to |params| or |model| outside of this callback.
Called before a context menu is displayed. |params| provides information
about the context menu state. |model| initially contains the default
context menu. The |model| can be cleared to show no context menu or
modified to show a custom menu. Do not keep references to |params| or
|model| outside of this callback.
Called before a context menu is displayed. |params| provides information
about the context menu state. |model| initially contains the default
context menu. The |model| can be cleared to show no context menu or
modified to show a custom menu. Do not keep references to |params| or
|model| outside of this callback.
Implement this interface to handle context menu events. The methods of this
class will be called on the UI thread.
Implement this interface to handle context menu events. The methods of this
class will be called on the UI thread.
Cancel quick menu display.
Cancel quick menu display.
Complete quick menu display by selecting the specified |command_id| and
|event_flags|.
Complete quick menu display by selecting the specified |command_id| and
|event_flags|.
Callback interface used for continuation of custom quick menu display.
Callback interface used for continuation of custom quick menu display.
Cancel context menu display.
Cancel context menu display.
Complete context menu display by selecting the specified |command_id| and
|event_flags|.
Complete context menu display by selecting the specified |command_id| and
|event_flags|.
Callback interface used for continuation of custom context menu display.
Callback interface used for continuation of custom context menu display.
Returns in |color| the color that was explicitly set for |command_id| and
|color_type|. Specify an |index| value of -1 to return the default color
in |color|. If a color was not set then 0 will be returned in |color|.
Returns true on success.
Returns in |color| the color that was explicitly set for |command_id| and
|color_type|. If a color was not set then 0 will be returned in |color|.
Returns true on success.
Set the explicit color for |command_id| and |index| to |color|. Specify a
|color| value of 0 to remove the explicit color. Specify an |index| value
of -1 to set the default color for items that do not have an explicit
color set. If no explicit color or default color is set for |color_type|
then the system color will be used. Returns true on success.
Set the explicit color for |command_id| and |color_type| to |color|.
Specify a |color| value of 0 to remove the explicit color. If no explicit
color or default color is set for |color_type| then the system color will
be used. Returns true on success.
Retrieves the keyboard accelerator for the specified |index|. Returns true
on success.
Retrieves the keyboard accelerator for the specified |command_id|. Returns
true on success.
Remove the keyboard accelerator at the specified |index|. Returns true on
success.
Remove the keyboard accelerator for the specified |command_id|. Returns
true on success.
Set the keyboard accelerator at the specified |index|. |key_code| can be
any virtual key or character value. Returns true on success.
Set the keyboard accelerator for the specified |command_id|. |key_code|
can be any virtual key or character value. Returns true on success.
Returns true if the specified |index| has a keyboard accelerator assigned.
Returns true if the specified |command_id| has a keyboard accelerator
assigned.
Check the specified |index|. Only applies to check and radio items.
Returns true on success.
Check the specified |command_id|. Only applies to check and radio items.
Returns true on success.
Returns true if the specified |index| is checked. Only applies to check
and radio items.
Returns true if the specified |command_id| is checked. Only applies to
check and radio items.
Change the enabled status at the specified |index|. Returns true on
success.
Change the enabled status of the specified |command_id|. Returns true on
success.
Returns true if the specified |index| is enabled.
Returns true if the specified |command_id| is enabled.
Change the visibility at the specified |index|. Returns true on success.
Change the visibility of the specified |command_id|. Returns true on
success.
Returns true if the specified |index| is visible.
Returns true if the specified |command_id| is visible.
Returns the submenu at the specified |index| or empty if invalid.
Returns the submenu for the specified |command_id| or empty if invalid.
Sets the group id at the specified |index|. Returns true on success.
Sets the group id for the specified |command_id|. Returns true on success.
Returns the group id at the specified |index| or -1 if invalid.
Returns the group id for the specified |command_id| or -1 if invalid.
Returns the item type at the specified |index|.
Returns the item type for the specified |command_id|.
Set the label at the specified |index|. Returns true on success.
Sets the label for the specified |command_id|. Returns true on success.
Returns the label at the specified |index| or empty if not found due to
invalid range or the index being a separator.
Returns the label for the specified |command_id| or empty if not found.
Sets the command id at the specified |index|. Returns true on success.
Returns the command id at the specified |index| or -1 if not found due to
invalid range or the index being a separator.
Returns the index associated with the specified |command_id| or -1 if not
found due to the command id not existing in the menu.
Removes the item at the specified |index|. Returns true on success.
Removes the item with the specified |command_id|. Returns true on success.
Insert a sub-menu in the menu at the specified |index|. The new sub-menu
is returned.
Insert a radio item in the menu at the specified |index|. Only a single
item with the specified |group_id| can be checked at a time. Returns true
on success.
Insert a check item in the menu at the specified |index|. Returns true on
success.
Insert an item in the menu at the specified |index|. Returns true on
success.
Insert a separator in the menu at the specified |index|. Returns true on
success.
Add a sub-menu to the menu. The new sub-menu is returned.
Add a radio item to the menu. Only a single item with the specified
|group_id| can be checked at a time. Returns true on success.
Add a check item to the menu. Returns true on success.
Add an item to the menu. Returns true on success.
Add a separator to the menu. Returns true on success.
Returns the number of items in this menu.
Clears the menu. Returns true on success.
Returns true if this menu is a submenu.
Create a new MenuModel with the specified |delegate|.
Supports creation and modification of menus. See cef_menu_id_t for the
command ids that have default implementations. All user-defined command ids
should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The methods of
this class can only be accessed on the browser process the UI thread.
Optionally modify a menu item label. Return true if |label| was modified.
The menu has closed.
The menu is about to show.
Called on unhandled close submenu keyboard commands. |is_rtl| will be true
if the menu is displaying a right-to-left language.
Called on unhandled open submenu keyboard commands. |is_rtl| will be true
if the menu is displaying a right-to-left language.
Called when the user moves the mouse outside the menu and over the owning
window.
Perform the action associated with the specified |command_id| and
optional |event_flags|.
Implement this interface to handle menu model events. The methods of this
class will be called on the browser process UI thread unless otherwise
indicated.
Called during browser creation to check if a Chrome toolbar button
should be visible. Only called for buttons that would be visible by
default. Only used with Chrome style.
Called during browser creation to check if a Chrome page action icon
should be visible. Only called for icons that would be visible by default.
Only used with Chrome style.
Called to check if a Chrome app menu item should be enabled. Use the
cef_id_for_command_id_name() function for version-safe mapping of command
IDC names from cef_command_ids.h to version-specific numerical
|command_id| values. Only called for menu items that would be enabled by
default. Only used with Chrome style.
Called to check if a Chrome app menu item should be visible. Use the
cef_id_for_command_id_name() function for version-safe mapping of command
IDC names from cef_command_ids.h to version-specific numerical
|command_id| values. Only called for menu items that would be visible by
default. Only used with Chrome style.
Called to execute a Chrome command triggered via menu selection or
keyboard shortcut. Use the cef_id_for_command_id_name()
function for version-safe mapping of command IDC names from
cef_command_ids.h to version-specific numerical |command_id| values.
|disposition| provides information about the intended command target.
Return true if the command was handled or false for the default
implementation. For context menu commands this will be called after
CefContextMenuHandler::OnContextMenuCommand. Only used with Chrome style.
Implement this interface to handle events related to commands. The methods
of this class will be called on the UI thread.
Called on the UI or audio stream thread when an error occurred. During the
stream creation phase this callback will be called on the UI thread while
in the capturing phase it will be called on the audio stream thread. The
stream will be stopped immediately.
Called on the UI thread when the stream has stopped. OnAudioSteamStopped
will always be called after OnAudioStreamStarted; both methods may be
called multiple times for the same stream.
Called on the audio stream thread when a PCM packet is received for the
stream. |data| is an array representing the raw PCM data as a floating
point type, i.e. 4-byte value(s). |frames| is the number of frames in the
PCM packet. |pts| is the presentation timestamp (in milliseconds since the
Unix Epoch) and represents the time at which the decompressed packet
should be presented to the user. Based on |frames| and the
|channel_layout| value passed to OnAudioStreamStarted you can calculate
the size of the |data| array in bytes.
Called on a browser audio capture thread when the browser starts
streaming audio. OnAudioStreamStopped will always be called after
OnAudioStreamStarted; both methods may be called multiple times
for the same browser. |params| contains the audio parameters like
sample rate and channel layout. |channels| is the number of channels.
Called on the UI thread to allow configuration of audio stream parameters.
Return true to proceed with audio stream capture, or false to cancel it.
All members of |params| can optionally be configured here, but they are
also pre-filled with some sensible defaults.
Implement this interface to handle audio events.
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.
Returns true if the function was called as a constructor via "new".
Returns true if the function was compiled using eval().
Returns the 1-based column offset on the line for the function call or 0
if unknown.
Returns the 1-based line number for the function call or 0 if unknown.
Returns the name of the function.
Returns the name of the resource script that contains the function or the
sourceURL value if the script name is undefined and its source ends with
a "//@ sourceURL=..." string.
Returns the name of the resource script that contains the function.
Returns true if the underlying handle is valid and it can be accessed on
the current thread. Do not call any other methods if this method returns
false.
Class representing a V8 stack frame handle. V8 handles can only be accessed
from the thread on which they are created. Valid threads for creating a V8
handle include the render process main thread (TID_RENDERER) and WebWorker
threads. A task runner for posting tasks on the associated thread can be
retrieved via the CefV8Context::GetTaskRunner() method.
Returns the stack frame at the specified 0-based index.
Returns the number of stack frames.
Returns true if the underlying handle is valid and it can be accessed on
the current thread. Do not call any other methods if this method returns
false.
Returns the stack trace for the currently active context. |frame_limit| is
the maximum number of frames that will be captured.
Class representing a V8 stack trace handle. V8 handles can only be accessed
from the thread on which they are created. Valid threads for creating a V8
handle include the render process main thread (TID_RENDERER) and WebWorker
threads. A task runner for posting tasks on the associated thread can be
retrieved via the CefV8Context::GetTaskRunner() method.
Reject the Promise using the current V8 context. This method should only
be called from within the scope of a CefV8Handler or CefV8Accessor
callback, or in combination with calling Enter() and Exit() on a stored
CefV8Context reference. Returns true on success. Returns false if this
method is called incorrectly or an exception is thrown.
Resolve the Promise using the current V8 context. This method should only
be called from within the scope of a CefV8Handler or CefV8Accessor
callback, or in combination with calling Enter() and Exit() on a stored
CefV8Context reference. |arg| is the argument passed to the resolved
promise. Returns true on success. Returns false if this method is called
incorrectly or an exception is thrown.
Execute the function using the specified V8 context. |object| is the
receiver ('this' object) of the function. If |object| is empty the
specified context's global object will be used. |arguments| is the list of
arguments that will be passed to the function. Returns the function return
value on success. Returns NULL if this method is called incorrectly or an
exception is thrown.
Execute the function using the current V8 context. This method should only
be called from within the scope of a CefV8Handler or CefV8Accessor
callback, or in combination with calling Enter() and Exit() on a stored
CefV8Context reference. |object| is the receiver ('this' object) of the
function. If |object| is empty the current context's global object will be
used. |arguments| is the list of arguments that will be passed to the
function. Returns the function return value on success. Returns NULL if
this method is called incorrectly or an exception is thrown.
Returns the function handler or NULL if not a CEF-created function.
Returns the function name.
Returns a pointer to the beginning of the memory block for this
ArrayBuffer backing store. The returned pointer is valid as long as the
CefV8Value is alive.
Returns the length (in bytes) of the ArrayBuffer.
Prevent the ArrayBuffer from using it's memory block by setting the length
to zero. This operation cannot be undone. If the ArrayBuffer was created
with CreateArrayBuffer then CefV8ArrayBufferReleaseCallback::ReleaseBuffer
will be called to release the underlying buffer.
Returns the ReleaseCallback object associated with the ArrayBuffer or NULL
if the ArrayBuffer was not created with CreateArrayBuffer.
Returns the number of elements in the array.
Adjusts the amount of registered external memory for the object. Used to
give V8 an indication of the amount of externally allocated memory that is
kept alive by JavaScript objects. V8 uses this information to decide when
to perform global garbage collection. Each CefV8Value tracks the amount of
external memory associated with it and automatically decreases the global
total by the appropriate amount on its destruction. |change_in_bytes|
specifies the number of bytes to adjust by. This method returns the number
of bytes associated with the object after the adjustment. This method can
only be called on user created objects.
Returns the amount of externally allocated memory registered for the
object.
Returns the user data, if any, assigned to this object.
Sets the user data for this object and returns true on success. Returns
false if this method is called incorrectly. This method can only be called
on user created objects.
Read the keys for the object's values into the specified vector. Integer-
based keys will also be returned as strings.
Registers an identifier and returns true on success. Access to the
identifier will be forwarded to the CefV8Accessor instance passed to
CefV8Value::CreateObject(). Returns false if this method is called
incorrectly or an exception is thrown. For read-only values this method
will return true even though assignment failed.
Associates a value with the specified identifier and returns true on
success. Returns false if this method is called incorrectly or an
exception is thrown. For read-only values this method will return true
even though assignment failed.
Associates a value with the specified identifier and returns true on
success. Returns false if this method is called incorrectly or an
exception is thrown. For read-only values this method will return true
even though assignment failed.
Returns the value with the specified identifier on success. Returns NULL
if this method is called incorrectly or an exception is thrown.
Returns the value with the specified identifier on success. Returns NULL
if this method is called incorrectly or an exception is thrown.
Deletes the value with the specified identifier and returns true on
success. Returns false if this method is called incorrectly, deletion
fails or an exception is thrown. For read-only and don't-delete values
this method will return true even though deletion failed.
Deletes the value with the specified identifier and returns true on
success. Returns false if this method is called incorrectly or an
exception is thrown. For read-only and don't-delete values this method
will return true even though deletion failed.
Returns true if the object has a value with the specified identifier.
Returns true if the object has a value with the specified identifier.
Set whether this object will re-throw future exceptions. By default
exceptions are not re-thrown. If a exception is re-thrown the current
context should not be accessed again until after the exception has been
caught and not re-thrown. Returns true on success. This attribute exists
only in the scope of the current CEF value object.
Returns true if this object will re-throw future exceptions. This
attribute exists only in the scope of the current CEF value object.
Clears the last exception and returns true on success.
Returns the exception resulting from the last method call. This attribute
exists only in the scope of the current CEF value object.
Returns true if the last method call resulted in an exception. This
attribute exists only in the scope of the current CEF value object.
OBJECT METHODS - These methods are only available on objects. Arrays and
functions are also objects. String- and integer-based keys can be used
interchangably with the framework converting between them as necessary.
Returns true if this is a user created object.
Return a string value.
Return a Date value.
Return a double value.
Return an unsigned int value.
Return an int value.
Return a bool value.
Returns true if this object is pointing to the same handle as |that|
object.
True if the value type is a Promise.
True if the value type is function.
True if the value type is an ArrayBuffer.
True if the value type is array.
True if the value type is object.
True if the value type is string.
True if the value type is Date.
True if the value type is double.
True if the value type is unsigned int.
True if the value type is int.
True if the value type is bool.
True if the value type is null.
True if the value type is undefined.
Returns true if the underlying handle is valid and it can be accessed on
the current thread. Do not call any other methods if this method returns
false.
Create a new CefV8Value object of type Promise. This method should only be
called from within the scope of a CefRenderProcessHandler, CefV8Handler or
CefV8Accessor callback, or in combination with calling Enter() and Exit()
on a stored CefV8Context reference.
Create a new CefV8Value object of type function. This method should only
be called from within the scope of a CefRenderProcessHandler, CefV8Handler
or CefV8Accessor callback, or in combination with calling Enter() and
Exit() on a stored CefV8Context reference.
Create a new CefV8Value object of type ArrayBuffer which copies the
provided |buffer| of size |length| bytes.
This method should only be called from within the scope of a
CefRenderProcessHandler, CefV8Handler or CefV8Accessor callback, or in
combination with calling Enter() and Exit() on a stored CefV8Context
reference.
Create a new CefV8Value object of type ArrayBuffer which wraps the
provided |buffer| of size |length| bytes. The ArrayBuffer is externalized,
meaning that it does not own |buffer|. The caller is responsible for
freeing |buffer| when requested via a call to
CefV8ArrayBufferReleaseCallback::ReleaseBuffer. This method should only
be called from within the scope of a CefRenderProcessHandler, CefV8Handler
or CefV8Accessor callback, or in combination with calling Enter() and
Exit() on a stored CefV8Context reference.
NOTE: Always returns nullptr when V8 sandbox is enabled.
Create a new CefV8Value object of type array with the specified |length|.
If |length| is negative the returned array will have length 0. This method
should only be called from within the scope of a CefRenderProcessHandler,
CefV8Handler or CefV8Accessor callback, or in combination with calling
Enter() and Exit() on a stored CefV8Context reference.
Create a new CefV8Value object of type object with optional accessor
and/or interceptor. This method should only be called from within the
scope of a CefRenderProcessHandler, CefV8Handler or CefV8Accessor
callback, or in combination with calling Enter() and Exit() on a stored
CefV8Context reference.
Create a new CefV8Value object of type string.
Create a new CefV8Value object of type Date. This method should only be
called from within the scope of a CefRenderProcessHandler, CefV8Handler or
CefV8Accessor callback, or in combination with calling Enter() and Exit()
on a stored CefV8Context reference.
Create a new CefV8Value object of type double.
Create a new CefV8Value object of type unsigned int.
Create a new CefV8Value object of type int.
Create a new CefV8Value object of type bool.
Create a new CefV8Value object of type null.
Create a new CefV8Value object of type undefined.
Class representing a V8 value handle. V8 handles can only be accessed from
the thread on which they are created. Valid threads for creating a V8 handle
include the render process main thread (TID_RENDERER) and WebWorker threads.
A task runner for posting tasks on the associated thread can be retrieved
via the CefV8Context::GetTaskRunner() method.
Called to release |buffer| when the ArrayBuffer JS object is garbage
collected. |buffer| is the value that was passed to CreateArrayBuffer
along with this object.
Callback interface that is passed to CefV8Value::CreateArrayBuffer.
Returns the index within the line of the last character where the error
occurred.
Returns the index within the line of the first character where the error
occurred.
Returns the index within the script of the last character where the error
occurred.
Returns the index within the script of the first character where the error
occurred.
Returns the 1-based number of the line where the error occurred or 0 if
the line number is unknown.
Returns the resource name for the script from where the function causing
the error originates.
Returns the line of source code that the exception occurred within.
Returns the exception message.
Class representing a V8 exception. The methods of this class may be called
on any render process thread.
Handle assignment of the interceptor value identified by |index|. |object|
is the receiver ('this' object) of the interceptor. |value| is the new
value being assigned to the interceptor. If assignment fails, set
|exception| to the exception that will be thrown.
Return true if interceptor assignment was handled, false otherwise.
Handle assignment of the interceptor value identified by |name|. |object|
is the receiver ('this' object) of the interceptor. |value| is the new
value being assigned to the interceptor. If assignment fails, set
|exception| to the exception that will be thrown. This setter will always
be called, even when the property has an associated accessor.
Return true if interceptor assignment was handled, false otherwise.
Handle retrieval of the interceptor value identified by |index|. |object|
is the receiver ('this' object) of the interceptor. If retrieval succeeds,
set |retval| to the return value. If the requested value does not exist,
don't set either |retval| or |exception|. If retrieval fails, set
|exception| to the exception that will be thrown.
Return true if interceptor retrieval was handled, false otherwise.
Handle retrieval of the interceptor value identified by |name|. |object|
is the receiver ('this' object) of the interceptor. If retrieval succeeds,
set |retval| to the return value. If the requested value does not exist,
don't set either |retval| or |exception|. If retrieval fails, set
|exception| to the exception that will be thrown. If the property has an
associated accessor, it will be called only if you don't set |retval|.
Return true if interceptor retrieval was handled, false otherwise.
Interface that should be implemented to handle V8 interceptor calls. The
methods of this class will be called on the thread associated with the V8
interceptor. Interceptor's named property handlers (with first argument of
type CefString) are called when object is indexed by string. Indexed
property handlers (with first argument of type int) are called when object
is indexed by integer.
Handle assignment of the accessor value identified by |name|. |object| is
the receiver ('this' object) of the accessor. |value| is the new value
being assigned to the accessor. If assignment fails set |exception| to the
exception that will be thrown. Return true if accessor assignment was
handled.
Handle retrieval the accessor value identified by |name|. |object| is the
receiver ('this' object) of the accessor. If retrieval succeeds set
|retval| to the return value. If retrieval fails set |exception| to the
exception that will be thrown. Return true if accessor retrieval was
handled.
Interface that should be implemented to handle V8 accessor calls. Accessor
identifiers are registered by calling CefV8Value::SetValue(). The methods
of this class will be called on the thread associated with the V8 accessor.
Handle execution of the function identified by |name|. |object| is the
receiver ('this' object) of the function. |arguments| is the list of
arguments passed to the function. If execution succeeds set |retval| to
the function return value. If execution fails set |exception| to the
exception that will be thrown. Return true if execution was handled.
Interface that should be implemented to handle V8 function calls. The
methods of this class will be called on the thread associated with the V8
function.
Execute a string of JavaScript code in this V8 context. The |script_url|
parameter is the URL where the script in question can be found, if any.
The |start_line| parameter is the base line number to use for error
reporting. On success |retval| will be set to the return value, if any,
and the function will return true. On failure |exception| will be set to
the exception, if any, and the function will return false.
Returns true if this object is pointing to the same handle as |that|
object.
Exit this context. Call this method only after calling Enter(). Returns
true if the scope was exited successfully.
Enter this context. A context must be explicitly entered before creating a
V8 Object, Array, Function or Date asynchronously. Exit() must be called
the same number of times as Enter() before releasing this context. V8
objects belong to the context in which they are created. Returns true if
the scope was entered successfully.
Returns the global object for this context. The context must be entered
before calling this method.
Returns the frame for this context. This method will return an empty
reference for WebWorker contexts.
Returns the browser for this context. This method will return an empty
reference for WebWorker contexts.
Returns true if the underlying handle is valid and it can be accessed on
the current thread. Do not call any other methods if this method returns
false.
Returns the task runner associated with this context. V8 handles can only
be accessed from the thread on which they are created. This method can be
called on any render process thread.
Returns true if V8 is currently inside a context.
Returns the entered (bottom) context object in the V8 context stack.
Returns the current (top) context object in the V8 context stack.
Class representing a V8 context handle. V8 handles can only be accessed from
the thread on which they are created. Valid threads for creating a V8 handle
include the render process main thread (TID_RENDERER) and WebWorker threads.
A task runner for posting tasks on the associated thread can be retrieved
via the CefV8Context::GetTaskRunner() method.
Register a new V8 extension with the specified JavaScript extension code and
handler. Functions implemented by the handler are prototyped using the
keyword 'native'. The calling of a native function is restricted to the
scope in which the prototype of the native function is defined. This
function may only be called on the render process main thread.
Example JavaScript extension code:
// create the 'example' global object if it doesn't already exist.
if (!example)
example = {};
// create the 'example.test' global object if it doesn't already exist.
if (!example.test)
example.test = {};
(function() {
// Define the function 'example.test.myfunction'.
example.test.myfunction = function() {
// Call CefV8Handler::Execute() with the function name 'MyFunction'
// and no arguments.
native function MyFunction();
return MyFunction();
};
// Define the getter function for parameter 'example.test.myparam'.
example.test.__defineGetter__('myparam', function() {
// Call CefV8Handler::Execute() with the function name 'GetMyParam'
// and no arguments.
native function GetMyParam();
return GetMyParam();
});
// Define the setter function for parameter 'example.test.myparam'.
example.test.__defineSetter__('myparam', function(b) {
// Call CefV8Handler::Execute() with the function name 'SetMyParam'
// and a single argument.
native function SetMyParam();
if(b) SetMyParam(b);
});
// Extension definitions can also contain normal JavaScript variables
// and functions.
var myint = 0;
example.test.increment = function() {
myint += 1;
return myint;
};
})();
Example usage in the page:
// Call the function.
example.test.myfunction();
// Set the parameter.
example.test.myparam = value;
// Get the parameter.
value = example.test.myparam;
// Call another function.
example.test.increment();
Post a task for delayed execution on the specified thread. Equivalent to
using CefTaskRunner::GetForThread(threadId)->PostDelayedTask(task,
delay_ms).
Post a task for execution on the specified thread. Equivalent to
using CefTaskRunner::GetForThread(threadId)->PostTask(task).
Returns true if called on the specified thread. Equivalent to using
CefTaskRunner::GetForThread(threadId)->BelongsToCurrentThread().
Post a task for delayed execution on the thread associated with this task
runner. Execution will occur asynchronously. Delayed tasks are not
supported on V8 WebWorker threads and will be executed without the
specified delay.
Post a task for execution on the thread associated with this task runner.
Execution will occur asynchronously.
Returns true if this task runner is for the specified CEF thread.
Returns true if this task runner belongs to the current thread.
Returns true if this object is pointing to the same task runner as |that|
object.
Returns the task runner for the specified CEF thread.
Returns the task runner for the current thread. Only CEF threads will have
task runners. An empty reference will be returned if this method is called
on an invalid thread.
Class that asynchronously executes tasks on the associated thread. It is
safe to call the methods of this class on any thread.
CEF maintains multiple internal threads that are used for handling different
types of tasks in different processes. The cef_thread_id_t definitions in
cef_types.h list the common CEF threads. Task runners are also available for
other CEF threads as appropriate (for example, V8 WebWorker threads).
Method that will be executed on the target thread.
Implement this interface for asynchronous task execution. If the task is
posted successfully and if the associated message loop is still running then
the Execute() method will be called on the target thread. If the task fails
to post then the task object may be destroyed on the source thread instead
of the target thread. For this reason be cautious when performing work in
the task object destructor.
Returns the runtime style for this browser (ALLOY or CHROME). See
cef_runtime_style_t documentation for details.
Returns true if the render process associated with this browser is
currently unresponsive as indicated by a lack of input event processing
for at least 15 seconds. To receive associated state change notifications
and optionally handle an unresponsive render process implement
CefRequestHandler::OnRenderProcessUnresponsive. This method can only be
called on the UI thread.
Execute a Chrome command. Use the cef_id_for_command_id_name()
function for version-safe mapping of command IDC names from
cef_command_ids.h to version-specific numerical |command_id| values.
|disposition| provides information about the intended command target. Only
used with Chrome style.
Returns true if a Chrome command is supported and enabled. Use the
cef_id_for_command_id_name() function for version-safe mapping of command
IDC names from cef_command_ids.h to version-specific numerical
|command_id| values. This method can only be called on the UI thread. Only
used with Chrome style.
Requests the renderer to exit browser fullscreen. In most cases exiting
window fullscreen should also exit browser fullscreen. With Alloy
style this method should be called in response to a user action such as
clicking the green traffic light button on MacOS
(CefWindowDelegate::OnWindowFullscreenTransition callback) or pressing the
"ESC" key (CefKeyboardHandler::OnPreKeyEvent callback). With Chrome
style these standard exit actions are handled internally but
new/additional user actions can use this method. Set |will_cause_resize|
to true if exiting browser fullscreen will cause a view resize.
Returns true if the renderer is currently in browser fullscreen. This
differs from window fullscreen in that browser fullscreen is entered using
the JavaScript Fullscreen API and modifies CSS attributes such as the
::backdrop pseudo-element and :fullscreen pseudo-class. This method can
only be called on the UI thread.
Returns true if the browser's audio is muted. This method can only be
called on the UI thread.
Set whether the browser's audio is muted.
Enable notifications of auto resize via CefDisplayHandler::OnAutoResize.
Notifications are disabled by default. |min_size| and |max_size| define
the range of allowed sizes.
Set accessibility state for all frames. |accessibility_state| may be
default, enabled or disabled. If |accessibility_state| is STATE_DEFAULT
then accessibility will be disabled by default and the state may be
further controlled with the "force-renderer-accessibility" and
"disable-renderer-accessibility" command-line switches. If
|accessibility_state| is STATE_ENABLED then accessibility will be enabled.
If |accessibility_state| is STATE_DISABLED then accessibility will be
completely disabled.
For windowed browsers accessibility will be enabled in Complete mode
(which corresponds to kAccessibilityModeComplete in Chromium). In this
mode all platform accessibility objects will be created and managed by
Chromium's internal implementation. The client needs only to detect the
screen reader and call this method appropriately. For example, on macOS
the client can handle the @"AXEnhancedUserInterface" accessibility
attribute to detect VoiceOver state changes and on Windows the client can
handle WM_GETOBJECT with OBJID_CLIENT to detect accessibility readers.
For windowless browsers accessibility will be enabled in TreeOnly mode
(which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In
this mode renderer accessibility is enabled, the full tree is computed,
and events are passed to CefAccessibiltyHandler, but platform
accessibility objects are not created. The client may implement platform
accessibility objects using CefAccessibiltyHandler callbacks if desired.
Returns the current visible navigation entry for this browser. This method
can only be called on the UI thread.
Call this method when the drag operation started by a
CefRenderHandler::StartDragging call has completed. This method may be
called immediately without first calling DragSourceEndedAt to cancel a
drag operation. If the web view is both the drag source and the drag
target then all DragTarget* methods should be called before DragSource*
mthods.
This method is only used when window rendering is disabled.
Call this method when the drag operation started by a
CefRenderHandler::StartDragging call has ended either in a drop or
by being cancelled. |x| and |y| are mouse coordinates relative to the
upper-left corner of the view. If the web view is both the drag source
and the drag target then all DragTarget* methods should be called before
DragSource* mthods.
This method is only used when window rendering is disabled.
Call this method when the user completes the drag operation by dropping
the object onto the web view (after calling DragTargetDragEnter).
The object being dropped is |drag_data|, given as an argument to
the previous DragTargetDragEnter call.
This method is only used when window rendering is disabled.
Call this method when the user drags the mouse out of the web view (after
calling DragTargetDragEnter).
This method is only used when window rendering is disabled.
Call this method each time the mouse is moved across the web view during
a drag operation (after calling DragTargetDragEnter and before calling
DragTargetDragLeave/DragTargetDrop).
This method is only used when window rendering is disabled.
Call this method when the user drags the mouse into the web view (before
calling DragTargetDragOver/DragTargetLeave/DragTargetDrop).
|drag_data| should not contain file contents as this type of data is not
allowed to be dragged into the web view. File contents can be removed
using CefDragData::ResetFileContents (for example, if |drag_data| comes
from CefRenderHandler::StartDragging). This method is only used when
window rendering is disabled.
Cancels the existing composition and discards the composition node
contents without applying them. See comments on ImeSetComposition for
usage.
This method is only used when window rendering is disabled.
Completes the existing composition by applying the current composition
node contents. If |keep_selection| is false the current selection, if any,
will be discarded. See comments on ImeSetComposition for usage. This
method is only used when window rendering is disabled.
Completes the existing composition by optionally inserting the specified
|text| into the composition node. |replacement_range| is an optional range
of the existing text that will be replaced. |relative_cursor_pos| is where
the cursor will be positioned relative to the current cursor position. See
comments on ImeSetComposition for usage. The |replacement_range| and
|relative_cursor_pos| values are only used on OS X.
This method is only used when window rendering is disabled.
Begins a new composition or updates the existing composition. Blink has a
special node (a composition node) that allows the input method to change
text without affecting other DOM nodes. |text| is the optional text that
will be inserted into the composition node. |underlines| is an optional
set of ranges that will be underlined in the resulting text.
|replacement_range| is an optional range of the existing text that will be
replaced. |selection_range| is an optional range of the resulting text
that will be selected after insertion or replacement. The
|replacement_range| value is only used on OS X.
This method may be called multiple times as the composition changes. When
the client is done making changes the composition should either be
canceled or completed. To cancel the composition call
ImeCancelComposition. To complete the composition call either
ImeCommitText or ImeFinishComposingText. Completion is usually signaled
when:
1. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR
flag (on Windows), or;
2. The client receives a "commit" signal of GtkIMContext (on Linux), or;
3. insertText of NSTextInput is called (on Mac).
This method is only used when window rendering is disabled.
Set 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). Can also be
set at browser creation via CefBrowserSettings.windowless_frame_rate.
Returns 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 method can only be called on the UI thread.
Notify the browser that the window hosting it is about to be moved or
resized. This method is only used on Windows and Linux.
Send a capture lost event to the browser.
Send a touch event to the browser for a windowless browser.
Send a mouse wheel event to the browser. The |x| and |y| coordinates are
relative to the upper-left corner of the view. The |deltaX| and |deltaY|
values represent the movement delta in the X and Y directions
respectively. In order to scroll inside select popups with window
rendering disabled CefRenderHandler::GetScreenPoint should be implemented
properly.
Send a mouse move event to the browser. The |x| and |y| coordinates are
relative to the upper-left corner of the view.
Send a mouse click event to the browser. The |x| and |y| coordinates are
relative to the upper-left corner of the view.
Send a key event to the browser.
Issue a BeginFrame request to Chromium. Only valid when
CefWindowInfo::external_begin_frame_enabled is set to true.
Invalidate the view. The browser will call CefRenderHandler::OnPaint
asynchronously. This method is only used when window rendering is
disabled.
Send a notification to the browser that the screen info has changed. The
browser will then call CefRenderHandler::GetScreenInfo to update the
screen information with the new values. This simulates moving the webview
window from one display to another, or changing the properties of the
current display. This method is only used when window rendering is
disabled.
Notify the browser that it has been hidden or shown. Layouting and
CefRenderHandler::OnPaint notification will stop when the browser is
hidden. This method is only used when window rendering is disabled.
Notify the browser that the widget has been resized. The browser will
first call CefRenderHandler::GetViewRect to get the new size and then call
CefRenderHandler::OnPaint asynchronously with the updated regions. This
method is only used when window rendering is disabled.
Returns true if window rendering is disabled.
Add the specified |word| to the spelling dictionary.
If a misspelled word is currently selected in an editable node calling
this method will replace it with the specified |word|.
Retrieve a snapshot of current navigation entries as values sent to the
specified visitor. If |current_only| is true only the current navigation
entry will be sent, otherwise all navigation entries will be sent.
Add an observer for DevTools protocol messages (method results and
events). The observer will remain registered until the returned
Registration object is destroyed. See the SendDevToolsMessage
documentation for additional usage information.
Execute a method call over the DevTools protocol. This is a more
structured version of SendDevToolsMessage. |message_id| is an incremental
number that uniquely identifies the message (pass 0 to have the next
number assigned automatically based on previous values). |method| is the
method name. |params| are the method parameters, which may be empty. See
the DevTools protocol documentation (linked above) for details of
supported methods and the expected |params| dictionary contents. This
method will return the assigned message ID if called on the UI thread and
the message was successfully submitted for validation, otherwise 0. See
the SendDevToolsMessage documentation for additional usage information.
Returns true if this browser currently has an associated DevTools browser.
Must be called on the browser process UI thread.
Explicitly close the associated DevTools browser, if any.
Open developer tools (DevTools) in its own browser. The DevTools browser
will remain associated with this browser. If the DevTools browser is
already open then it will be focused, in which case the |windowInfo|,
|client| and |settings| parameters will be ignored. If
|inspect_element_at| is non-empty then the element at the specified (x,y)
location will be inspected. The |windowInfo| parameter will be ignored if
this browser is wrapped in a CefBrowserView.
Cancel all searches that are currently going on.
Search for |searchText|. |forward| indicates whether to search forward or
backward within the page. |matchCase| indicates whether the search should
be case-sensitive. |findNext| indicates whether this is the first request
or a follow-up. The search will be restarted if |searchText| or
|matchCase| change. The search will be stopped if |searchText| is empty.
The CefFindHandler instance, if any, returned via
CefClient::GetFindHandler will be called to report find results.
Print the current browser contents to the PDF file specified by |path| and
execute |callback| on completion. The caller is responsible for deleting
|path| when done. For PDF printing to work on Linux you must implement the
CefPrintHandler::GetPdfPaperSize method.
Print the current browser contents.
Download the file at |url| using CefDownloadHandler.
Call to run a file chooser dialog. Only a single file chooser dialog may
be pending at any given time. |mode| represents the type of dialog to
display. |title| to the title to be used for the dialog and may be empty
to show the default title ("Open" or "Save" depending on the mode).
|default_file_path| is the path with optional directory and/or file name
component that will be initially selected in the dialog. |accept_filters|
are used to restrict the selectable file types and may any combination of
(a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b)
individual file extensions (e.g.
".txt" or ".png"), or (c) combined description and file extension
delimited using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg").
|callback| will be executed after the dialog is dismissed or immediately
if another dialog is already pending. The dialog will be initiated
asynchronously on the UI thread.
Change the zoom level to the specified value. Specify 0.0 to reset the
zoom level to the default. If called on the UI thread the change will be
applied immediately. Otherwise, the change will be applied asynchronously
on the UI thread.
Get the current zoom level. This method can only be called on the UI
thread.
Get the default zoom level. This value will be 0.0 by default but can be
configured. This method can only be called on the UI thread.
Execute a zoom command in this browser. If called on the UI thread the
change will be applied immediately. Otherwise, the change will be applied
asynchronously on the UI thread.
Returns true if this browser can execute the specified zoom command. This
method can only be called on the UI thread.
Returns the request context for this browser.
Returns the client for this browser.
Returns true if this browser is wrapped in a CefBrowserView.
Retrieve the unique identifier of the browser that opened this browser.
Will return 0 for non-popup browsers.
Retrieve the window handle (if any) of the browser that opened this
browser. Will return NULL for non-popup browsers or if this browser is
wrapped in a CefBrowserView. This method can be used in combination with
custom handling of modal windows.
Retrieve the window handle (if any) for this browser. If this browser is
wrapped in a CefBrowserView this method should be called on the browser
process UI thread and it will return the handle for the top-level native
window.
Set whether the browser is focused.
Returns true if the browser is ready to be closed, meaning that the close
has already been initiated and that JavaScript unload handlers have
already executed or should be ignored. This can be used from a top-level
window close handler such as CefWindowDelegate::CanClose (or
platform-specific equivalent) to distringuish between potentially
cancelable browser close events (like the user clicking the top-level
window close button before browser close has started) and mandatory
browser close events (like JavaScript `window.close()` or after browser
close has started in response to [Try]CloseBrowser()). Not completing the
browser close for mandatory close events (when this method returns true)
will leave the browser in a partially closed state that interferes with
proper functioning. See CloseBrowser() documentation for additional usage
information. This method must be called on the browser process UI thread.
Helper for closing a browser. This is similar in behavior to
CLoseBrowser(false) but returns a boolean to reflect the immediate close
status. Call this method from a top-level window close handler such as
CefWindowDelegate::CanClose (or platform-specific equivalent) to request
that the browser close, and return the result to indicate if the window
close should proceed. Returns false if the close will be delayed
(JavaScript unload handlers triggered but still pending) or true if the
close will proceed immediately (possibly asynchronously). See
CloseBrowser() documentation for additional usage information. This method
must be called on the browser process UI thread.
Request that the browser close. Closing a browser is a multi-stage process
that may complete either synchronously or asynchronously, and involves
callbacks such as CefLifeSpanHandler::DoClose (Alloy style only),
CefLifeSpanHandler::OnBeforeClose, and a top-level window close handler
such as CefWindowDelegate::CanClose (or platform-specific equivalent). In
some cases a close request may be delayed or canceled by the user. Using
TryCloseBrowser() instead of CloseBrowser() is recommended for most use
cases. See CefLifeSpanHandler::DoClose() documentation for detailed usage
and examples.
If |force_close| is false then JavaScript unload handlers, if any, may be
fired and the close may be delayed or canceled by the user. If
|force_close| is true then the user will not be prompted and the close
will proceed immediately (possibly asynchronously). If browser close is
delayed and not canceled the default behavior is to call the top-level
window close handler once the browser is ready to be closed. This default
behavior can be changed for Alloy style browsers by implementing
CefLifeSpanHandler::DoClose(). IsReadyToBeClosed() can be used to detect
mandatory browser close events when customizing close behavior on the
browser process UI thread.
Returns the hosted browser object.
Returns the browser (if any) with the specified identifier.
Create a new browser using the window parameters specified by
|windowInfo|. If |request_context| is empty the global request context
will be used. This method can only be called on the browser process UI
thread. The optional |extra_info| parameter provides an opportunity to
specify extra information specific to the created browser that will be
passed to CefRenderProcessHandler::OnBrowserCreated() in the render
process.
Create a new browser using the window parameters specified by
|windowInfo|. All values will be copied internally and the actual window
(if any) will be created on the UI thread. If |request_context| is empty
the global request context will be used. This method can be called on any
browser process thread and will not block. The optional |extra_info|
parameter provides an opportunity to specify extra information specific to
the created browser that will be passed to
CefRenderProcessHandler::OnBrowserCreated() in the render process.
Class used to represent the browser process aspects of a browser. The
methods of this class can only be called in the browser process. They may be
called on any thread in that process unless otherwise indicated in the
comments.
Method that will be executed when the image download has completed.
|image_url| is the URL that was downloaded and |http_status_code| is the
resulting HTTP status code. |image| is the resulting image, possibly at
multiple scale factors, or empty if the download failed.
Callback interface for CefBrowserHost::DownloadImage. The methods of this
class will be called on the browser process UI thread.
Method that will be executed when the PDF printing has completed. |path|
is the output path. |ok| will be true if the printing completed
successfully or false otherwise.
Callback interface for CefBrowserHost::PrintToPDF. The methods of this class
will be called on the browser process UI thread.
Method that will be executed. Do not keep a reference to |entry| outside
of this callback. Return true to continue visiting entries or false to
stop. |current| is true if this entry is the currently loaded navigation
entry. |index| is the 0-based index of this entry and |total| is the total
number of entries.
Callback interface for CefBrowserHost::GetNavigationEntries. The methods of
this class will be called on the browser process UI thread.
Called asynchronously after the file dialog is dismissed.
|file_paths| will be a single value or a list of values depending on the
dialog mode. If the selection was cancelled |file_paths| will be empty.
Callback interface for CefBrowserHost::RunFileDialog. The methods of this
class will be called on the browser process UI thread.
Returns the names of all existing frames.
Returns the identifiers of all existing frames.
Returns the number of frames that currently exist.
Returns the frame with the specified name, or NULL if not found.
Returns the frame with the specified identifier, or NULL if not found.
Returns the focused frame for the browser.
Returns the main (top-level) frame for the browser. In the browser process
this will return a valid object until after
CefLifeSpanHandler::OnBeforeClose is called. In the renderer process this
will return NULL if the main frame is hosted in a different renderer
process (e.g. for cross-origin sub-frames). The main frame object will
change during cross-origin navigation or re-navigation after renderer
process termination (due to crashes, etc).
Returns true if a document has been loaded in the browser.
Returns true if the browser is a popup.
Returns true if this object is pointing to the same handle as |that|
object.
Returns the globally unique identifier for this browser. This value is
also used as the tabId for extension APIs.
Stop loading the page.
Reload the current page ignoring any cached data.
Reload the current page.
Returns true if the browser is currently loading.
Navigate forwards.
Returns true if the browser can navigate forwards.
Navigate backwards.
Returns true if the browser can navigate backwards.
Returns the browser host object. This method can only be called in the
browser process.
True if this object is currently valid. This will return false after
CefLifeSpanHandler::OnBeforeClose is called.
Class used to represent a browser. When used in the browser process the
methods of this class may be called on any thread unless otherwise indicated
in the comments. When used in the render process the methods of this class
may only be called on the main thread.
Returns the current Chrome color scheme variant. Must be called on the
browser process UI thread.
Returns the current Chrome color scheme color, or transparent (0) for the
default color. Must be called on the browser process UI thread.
Returns the current Chrome color scheme mode (SYSTEM, LIGHT or DARK). Must
be called on the browser process UI thread.
Sets the Chrome color scheme for all browsers that share this request
context. |variant| values of SYSTEM, LIGHT and DARK change the underlying
color mode (e.g. light vs dark). Other |variant| values determine how
|user_color| will be applied in the current color mode. If |user_color| is
transparent (0) the default color will be used.
Add an observer for content and website setting changes. The observer will
remain registered until the returned Registration object is destroyed.
This method must be called on the browser process UI thread.
Sets the current value for |content_type| for the specified URLs in the
default scope. If both URLs are empty, and the context is not incognito,
the default value will be set. Pass CEF_CONTENT_SETTING_VALUE_DEFAULT for
|value| to use the default value for this content type.
WARNING: Incorrect usage of this method may cause instability or security
issues in Chromium. Make sure that you first understand the potential
impact of any changes to |content_type| by reviewing the related source
code in Chromium. For example, if you plan to modify
CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
ContentSettingsType::POPUPS in Chromium:
https://source.chromium.org/search?q=ContentSettingsType::POPUPS
Returns the current value for |content_type| that applies for the
specified URLs. If both URLs are empty the default value will be returned.
Returns CEF_CONTENT_SETTING_VALUE_DEFAULT if no value is configured. Must
be called on the browser process UI thread.
Sets the current value for |content_type| for the specified URLs in the
default scope. If both URLs are empty, and the context is not incognito,
the default value will be set. Pass nullptr for |value| to remove the
default value for this content type.
WARNING: Incorrect usage of this method may cause instability or security
issues in Chromium. Make sure that you first understand the potential
impact of any changes to |content_type| by reviewing the related source
code in Chromium. For example, if you plan to modify
CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of
ContentSettingsType::POPUPS in Chromium:
https://source.chromium.org/search?q=ContentSettingsType::POPUPS
Returns the current value for |content_type| that applies for the
specified URLs. If both URLs are empty the default value will be returned.
Returns nullptr if no value is configured. Must be called on the browser
process UI thread.
Returns the MediaRouter object associated with this context. If
|callback| is non-NULL it will be executed asnychronously on the UI thread
after the manager's context has been initialized.
Attempts to resolve |origin| to a list of associated IP addresses.
|callback| will be executed on the UI thread after completion.
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 CefShutdown(). If |callback| is non-NULL it will be
executed on the UI thread after completion.
Clears all HTTP authentication credentials that were added as part of
handling GetAuthCredentials. If |callback| is non-NULL it will be executed
on the UI thread after completion.
Clears all certificate exceptions that were added as part of handling
CefRequestHandler::OnCertificateError(). If you call this it is
recommended that you also call CloseAllConnections() or you risk not
being prompted again for server certificates if you reconnect quickly.
If |callback| is non-NULL it will be executed on the UI thread after
completion.
Clear all registered scheme handler factories. Returns false on error.
This function may be called on any thread in the browser process.
Register a scheme handler factory for the specified |scheme_name| and
optional |domain_name|. An empty |domain_name| value for a standard scheme
will cause the factory to match all domain names. The |domain_name| value
will be ignored for non-standard schemes. If |scheme_name| is a built-in
scheme and no handler is returned by |factory| then the built-in scheme
handler factory will be called. If |scheme_name| is a custom scheme then
you must also implement the CefApp::OnRegisterCustomSchemes() method in
all processes. This function may be called multiple times to change or
remove the factory that matches the specified |scheme_name| and optional
|domain_name|. Returns false if an error occurs. This function may be
called on any thread in the browser process.
Returns the cookie manager for this object. If |callback| is non-NULL it
will be executed asnychronously on the UI thread after the manager's
storage has been initialized.
Returns the cache path for this object. If empty an "incognito mode"
in-memory cache is being used.
Returns the handler for this context if any.
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 true if this object is sharing the same storage as |that| object.
Returns true if this object is pointing to the same context as |that|
object.
Creates a new context object that shares storage with |other| and uses an
optional |handler|.
Creates a new context object with the specified |settings| and optional
|handler|.
Returns the global context object.
A request context provides request handling for a set of related browser
or URL request objects. A request context can be specified when creating a
new browser via the CefBrowserHost static factory methods or when creating a
new URL request via the CefURLRequest 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.
Called when a content or website setting has changed. The new value can be
retrieved using CefRequestContext::GetContentSetting or
CefRequestContext::GetWebsiteSetting.
Implemented by the client to observe content and website setting changes and
registered via CefRequestContext::AddSettingObserver. The methods of this
class will be called on the browser process UI thread.
Called on the UI thread after the ResolveHost request has completed.
|result| will be the result code. |resolved_ips| will be the list of
resolved IP addresses or empty if the resolution failed.
Callback interface for CefRequestContext::ResolveHost.
Add an observer for preference changes. |name| is the name of the
preference to observe. If |name| is empty then all preferences will
be observed. Observing all preferences has performance consequences and
is not recommended outside of testing scenarios. The observer will remain
registered until the returned Registration object is destroyed. This
method must be called on the browser process UI thread.
Set the |value| associated with preference |name|. Returns true if the
value is set successfully and false otherwise. 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 browser
process 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 browser
process UI thread.
Returns all preferences as a dictionary. If |include_defaults| is true
then preferences currently at their default value will be included. 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.
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 browser process UI thread.
Returns true if a preference with the specified |name| exists. This method
must be called on the browser process UI thread.
Returns the global preference manager object.
Returns the current Chrome Variations configuration (combination of field
trials and chrome://flags) as human-readable strings. This is the
human-readable equivalent of the "Active Variations" section of
chrome://version. See
https://developer.chrome.com/docs/web-platform/chrome-variations for
background and details. Note that field trial tests are disabled by
default in Official CEF builds (via the
`disable_fieldtrial_testing_config=true` GN flag). This method must be
called on the browser process UI thread.
Returns the current Chrome Variations configuration (combination of field
trials and chrome://flags) as equivalent command-line switches
(`--[enable|disable]-features=XXXX`, etc). These switches can be used to
apply the same configuration when launching a CEF-based application. See
https://developer.chrome.com/docs/web-platform/chrome-variations for
background and details. Note that field trial tests are disabled by
default in Official CEF builds (via the
`disable_fieldtrial_testing_config=true` GN flag). This method must be
called on the browser process UI thread.
Manage access to preferences. Many built-in preferences are registered by
Chromium. Custom preferences can be registered in
CefBrowserProcessHandler::OnRegisterCustomPreferences.
Called when a preference has changed. The new value can be retrieved using
CefPreferenceManager::GetPreference.
Implemented by the client to observe preference changes and registered via
CefPreferenceManager::AddPreferenceObserver. The methods of this class will
be called on the browser process UI thread.
Register a preference with the specified |name| and |default_value|. To
avoid conflicts with built-in preferences the |name| value should contain
an application-specific prefix followed by a period (e.g. "myapp.value").
The contents of |default_value| will be copied. The data type for the
preference will be inferred from |default_value|'s type and cannot be
changed after registration. Returns true on success. Returns false if
|name| is already registered or if |default_value| has an invalid type.
This method must be called from within the scope of the
CefBrowserProcessHandler::OnRegisterCustomPreferences callback.
Class that manages custom preference registrations.
Returns true if this source outputs its content via DIAL.
Returns true if this source outputs its content via Cast.
Returns the ID (media source URN or URL) for this source.
Represents a source from which media can be routed. Instances of this object
are retrieved via CefMediaRouter::GetSource. The methods of this class may
be called on any browser process thread unless otherwise indicated.
Method that will be executed asyncronously once device information has
been retrieved.
Callback interface for CefMediaSink::GetDeviceInfo. The methods of this
class will be called on the browser process UI thread.
Returns true if this sink is compatible with |source|.
Returns true if this sink accepts content via DIAL.
Returns true if this sink accepts content via Cast.
Asynchronously retrieves device info.
Returns the icon type for this sink.
Returns the name of this sink.
Returns the ID for this sink.
Represents a sink to which media can be routed. Instances of this object are
retrieved via CefMediaObserver::OnSinks. The methods of this class may
be called on any browser process thread unless otherwise indicated.
Method that will be executed when the route creation has finished.
|result| will be CEF_MRCR_OK if the route creation succeeded. |error| will
be a description of the error if the route creation failed. |route| is the
resulting route, or empty if the route creation failed.
Callback interface for CefMediaRouter::CreateRoute. The methods of this
class will be called on the browser process UI thread.
Terminate this route. Will result in an asynchronous call to
CefMediaObserver::OnRoutes on all registered observers.
Send a message over this route. |message| will be copied if necessary.
Returns the sink associated with this route.
Returns the source associated with this route.
Returns the ID for this route.
Represents the route between a media source and sink. Instances of this
object are created via CefMediaRouter::CreateRoute and retrieved via
CefMediaObserver::OnRoutes. Contains the status and metadata of a
routing operation. The methods of this class may be called on any browser
process thread unless otherwise indicated.
A message was received over |route|. |message| is only valid for
the scope of this callback and should be copied if necessary.
The connection state of |route| has changed.
The list of available media routes has changed or
CefMediaRouter::NotifyCurrentRoutes was called.
The list of available media sinks has changed or
CefMediaRouter::NotifyCurrentSinks was called.
Implemented by the client to observe MediaRouter events and registered via
CefMediaRouter::AddObserver. The methods of this class will be called on the
browser process UI thread.
Trigger an asynchronous call to CefMediaObserver::OnRoutes on all
registered observers.
Create a new route between |source| and |sink|. Source and sink must be
valid, compatible (as reported by CefMediaSink::IsCompatibleWith), and a
route between them must not already exist. |callback| will be executed
on success or failure. If route creation succeeds it will also trigger an
asynchronous call to CefMediaObserver::OnRoutes on all registered
observers.
Trigger an asynchronous call to CefMediaObserver::OnSinks on all
registered observers.
Add an observer for MediaRouter events. The observer will remain
registered until the returned Registration object is destroyed.
Returns the MediaRouter object associated with the global request context.
If |callback| is non-NULL it will be executed asnychronously on the UI
thread after the manager's storage has been initialized. Equivalent to
calling CefRequestContext::GetGlobalContext()->GetMediaRouter().
Supports discovery of and communication with media devices on the local
network via the Cast and DIAL protocols. The methods of this class may be
called on any browser process thread unless otherwise indicated.
Method that will be called upon completion. |num_deleted| will be the
number of cookies that were deleted.
Interface to implement to be notified of asynchronous completion via
CefCookieManager::DeleteCookies().
Method that will be called upon completion. |success| will be true if the
cookie was set successfully.
Interface to implement to be notified of asynchronous completion via
CefCookieManager::SetCookie().
Method that will be called once for each cookie. |count| is the 0-based
index for the current cookie. |total| is the total number of cookies.
Set |deleteCookie| to true to delete the cookie currently being visited.
Return false to stop visiting cookies. This method may never be called if
no cookies are found.
Interface to implement for visiting cookie values. The methods of this class
will always be called on the UI thread.
Flush the backing store (if any) to disk. If |callback| is non-NULL it
will be executed asnychronously on the UI thread after the flush is
complete. Returns false if cookies cannot be accessed.
Delete all cookies that match the specified parameters. If both |url| and
|cookie_name| values are specified all host and domain cookies matching
both will be deleted. If only |url| is specified all host cookies (but not
domain cookies) irrespective of path will be deleted. If |url| is empty
all cookies for all hosts and domains will be deleted. If |callback| is
non-NULL it will be executed asnychronously on the UI thread after the
cookies have been deleted. Returns false if a non-empty invalid URL is
specified or if cookies cannot be accessed. Cookies can alternately be
deleted using the Visit*Cookies() methods.
Sets a cookie given a valid URL and explicit user-provided cookie
attributes. This function expects each attribute to be well-formed. It
will check for disallowed characters (e.g. the ';' character is disallowed
within the cookie value attribute) and fail without setting the cookie if
such characters are found. If |callback| is non-NULL it will be executed
asnychronously on the UI thread after the cookie has been set. Returns
false if an invalid URL is specified or if cookies cannot be accessed.
Visit a subset of cookies on the UI thread. The results are filtered by
the given url scheme, host, domain and path. If |includeHttpOnly| is true
HTTP-only cookies will also be included in the results. The returned
cookies are ordered by longest path, then by earliest creation date.
Returns false if cookies cannot be accessed.
Visit all cookies on the UI thread. The returned cookies are ordered by
longest path, then by earliest creation date. Returns false if cookies
cannot be accessed.
Returns the global cookie manager. By default data will be stored at
cef_settings_t.cache_path if specified or in memory otherwise. If
|callback| is non-NULL it will be executed asnychronously on the UI thread
after the manager's storage has been initialized. Using this method is
equivalent to calling
CefRequestContext::GetGlobalContext()->GetDefaultCookieManager().
Class used for managing cookies. The methods of this class may be called on
any thread unless otherwise indicated.
Method that will be called once the task is complete.
Generic callback interface used for asynchronous completion.
Cancel processing.
Continue processing.
Generic callback interface used for asynchronous continuation.
Generic callback interface used for managing the lifespan of a registration.
Returns the SSL information for this navigation entry.
Returns the HTTP status code for the last known successful navigation
response. May be 0 if the response has not yet been received or if the
navigation has not yet completed.
Returns the time for the last known successful navigation completion. A
navigation may be completed more than once if the page is reloaded. May be
0 if the navigation has not yet completed.
Returns true if this navigation includes post data.
Returns the transition type which indicates what the user did to move to
this page from the previous page.
Returns the title set by the page. This value may be empty.
Returns the original URL that was entered by the user before any
redirects.
Returns a display-friendly version of the URL.
Returns the actual URL of the page. For some pages this may be data: URL
or similar. Use GetDisplayURL() to return a display-friendly version.
Returns true if this object is valid. Do not call any other methods if
this function returns false.
Class used to represent an entry in navigation history.
Returns the X.509 certificate.
Returns a bitmask containing the page security content status.
Returns the SSL version used for the SSL connection.
Returns a bitmask containing any and all problems verifying the server
certificate.
Returns true if the status is related to a secure SSL/TLS connection.
Class representing the SSL information for a navigation entry.
Returns the PEM encoded data for the certificate issuer chain.
If we failed to encode a certificate in the chain it is still
present in the array but is an empty string.
Returns the DER encoded data for the certificate issuer chain.
If we failed to encode a certificate in the chain it is still
present in the array but is an empty string.
Returns the number of certificates in the issuer chain.
If 0, the certificate is self-signed.
Returns the PEM encoded data for the X.509 certificate.
Returns the DER encoded data for the X.509 certificate.
Returns the date after which the X.509 certificate is invalid.
CefBaseTime.GetTimeT() will return 0 if no date was specified.
Returns the date before which the X.509 certificate is invalid.
CefBaseTime.GetTimeT() will return 0 if no date was specified.
Returns the DER encoded serial number for the X.509 certificate. The value
possibly includes a leading 00 byte.
Returns the issuer of the X.509 certificate.
Returns the subject of the X.509 certificate. For HTTPS server
certificates this represents the web server. The common name of the
subject should match the host name of the web server.
Class representing a X.509 certificate.
Retrieve the list of organization unit names.
Retrieve the list of organization names.
Returns the country name.
Returns the state or province name.
Returns the locality name.
Returns the common name.
Returns a name that can be used to represent the issuer. It tries in this
order: Common Name (CN), Organization Name (O) and Organizational Unit
Name (OU) and returns the first non-empty one found.
Class representing the issuer or subject field of an X.509 certificate.
Send a message to the specified |target_process|. Ownership of the message
contents will be transferred and the |message| reference will be
invalidated. Message delivery is not guaranteed in all cases (for example,
if the browser is closing, navigating, or if the target process crashes).
Send an ACK message back from the target process if confirmation is
required.
Create a new URL request that will be treated as originating from this
frame and the associated browser. Use CefURLRequest::Create instead if you
do not want the request to have this association, in which case it may be
handled differently (see documentation on that method). A request created
with this method may only originate from the browser process, and will
behave as follows:
- It may be intercepted by the client via CefResourceRequestHandler or
CefSchemeHandlerFactory.
- POST data may only contain a single element of type PDE_TYPE_FILE or
PDE_TYPE_BYTES.
The |request| object will be marked as read-only after calling this
method.
Visit the DOM document. This method can only be called from the render
process.
Get the V8 context associated with the frame. This method can only be
called from the render process.
Returns the browser that this frame belongs to.
Returns the URL currently loaded in this frame.
Returns the parent of this frame or NULL if this is the main (top-level)
frame.
Returns the globally unique identifier for this frame or empty if the
underlying frame does not yet exist.
Returns the name for this frame. If the frame has an assigned name (for
example, set via the iframe "name" attribute) then that value will be
returned. Otherwise a unique name will be constructed based on the frame
parent hierarchy. The main (top-level) frame will always have an empty
name value.
Returns true if this is the focused frame.
Returns true if this is the main (top-level) frame.
Execute a string of JavaScript code in this frame. The |script_url|
parameter is the URL where the script in question can be found, if any.
The renderer may request this URL to show the developer the source of the
error. The |start_line| parameter is the base line number to use for
error reporting.
Load the specified |url|.
Load the request represented by the |request| object.
WARNING: This method will fail with "bad IPC message" reason
INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the
request origin using some other mechanism (LoadURL, link click, etc).
Retrieve this frame's display text as a string sent to the specified
visitor.
Retrieve this frame's HTML source as a string sent to the specified
visitor.
Save this frame's HTML source to a temporary file and open it in the
default text viewing application. This method can only be called from the
browser process.
Execute select all in this frame.
Execute delete in this frame.
Execute paste and match style in this frame.
Execute paste in this frame.
Execute copy in this frame.
Execute cut in this frame.
Execute redo in this frame.
Execute undo in this frame.
True if this object is currently attached to a valid frame.
Class used to represent a frame in the browser window. When used in the
browser process the methods of this class may be called on any thread unless
otherwise indicated in the comments. When used in the render process the
methods of this class may only be called on the main thread.
Method that will be executed.
Implement this interface to receive string values asynchronously.
Read up to |size| bytes into |bytes| and return the number of bytes
actually read.
Return the number of bytes.
Return the file name.
Return the type of this post data element.
The post data element will represent bytes. The bytes passed
in will be copied.
The post data element will represent a file.
Remove all contents from the post data element.
Returns true if this object is read-only.
Create a new CefPostDataElement object.
Post data elements may represent either bytes or files.
Class used to represent a single element in the request post data. The
methods of this class may be called on any thread.
Remove all existing post data elements.
Add the specified post data element. Returns true if the add succeeds.
Remove the specified post data element. Returns true if the removal
succeeds.
Retrieve the post data elements.
Returns the number of existing post data elements.
Returns true if the underlying POST data includes elements that are not
represented by this CefPostData object (for example, multi-part file
upload data). Modifying CefPostData objects with excluded elements may
result in the request failing.
Returns true if this object is read-only.
Create a new CefPostData object.
Class used to represent post data for a web request. The methods of this
class may be called on any thread.
Returns the globally unique identifier for this request or 0 if not
specified. Can be used by CefResourceRequestHandler implementations in the
browser process to track a single request across multiple callbacks.
Get the transition type for this request. Only available in the browser
process and only applies to requests that represent a main frame or
sub-frame navigation.
Get the resource type for this request. Only available in the browser
process.
Set the URL to the first party for cookies used in combination with
CefURLRequest.
Get the URL to the first party for cookies used in combination with
CefURLRequest.
Set the flags used in combination with CefURLRequest. See
cef_urlrequest_flags_t for supported values.
Get the flags used in combination with CefURLRequest. See
cef_urlrequest_flags_t for supported values.
Set all values at one time.
Set the header |name| to |value|. If |overwrite| is true any existing
values will be replaced with the new value. If |overwrite| is false any
existing values will not be overwritten. The Referer value cannot be set
using this method.
Returns the first header value for |name| or an empty string if not found.
Will not return the Referer value if any. Use GetHeaderMap instead if
|name| might have multiple values.
Set the header values. If a Referer value exists in the header map it will
be removed and ignored.
Get the header values. Will not include the Referer value if any.
Set the post data.
Get the post data.
Get the referrer policy.
Get the referrer URL.
Set the referrer URL and policy. If non-empty the referrer URL must be
fully qualified with an HTTP or HTTPS scheme component. Any username,
password or ref component will be removed.
Set the request method type.
Get the request method type. The value will default to POST if post data
is provided and GET otherwise.
Set the fully qualified URL.
Get the fully qualified URL.
Returns true if this object is read-only.
Create a new CefRequest object.
Class used to represent a web request. The methods of this class may be
called on any thread.
Returns the shared memory region.
Returns nullptr when message contains an argument list.
Returns the list of arguments.
Returns nullptr when message contains a shared memory region.
Returns the message name.
Returns a writable copy of this object.
Returns nullptr when message contains a shared memory region.
Returns true if the values of this object are read-only. Some APIs may
expose read-only objects.
Returns true if this object is valid. Do not call any other methods if
this function returns false.
Create a new CefProcessMessage object with the specified name.
Class representing a message. Can be used on any process and thread.
Returns the pointer to the memory. Returns nullptr for invalid instances.
The returned pointer is only valid for the life span of this object.
Returns the size of the mapping in bytes. Returns 0 for invalid instances.
Returns true if the mapping is valid.
Class that wraps platform-dependent share memory region mapping.
Returns the bounds of the element in device pixels. Use
"window.devicePixelRatio" to convert to/from CSS pixels.
Returns the inner text of the element.
Set the value for the element attribute named |attrName|. Returns true on
success.
Returns a map of all element attributes.
Returns the element attribute named |attrName|.
Returns true if this element has an attribute named |attrName|.
Returns true if this element has attributes.
Returns the tag name of this element.
Returns the last child node.
Return the first child node.
Returns true if this node has child nodes.
Returns the next sibling node.
Returns the previous sibling node.
Returns the parent node.
Returns the document associated with this node.
Returns the contents of this node as markup.
Set the value of this node. Returns true on success.
Returns the value of this node.
Returns the name of this node.
Returns true if this object is pointing to the same handle as |that|
object.
Returns the type of this form control element node.
Returns true if this is a form control element node.
Returns true if this is an editable node.
Returns true if this is an element node.
Returns true if this is a text node.
Returns the type for this node.
Class used to represent a DOM node. The methods of this class should only be
called on the render process main thread.
Returns a complete URL based on the document base URL and the specified
partial URL.
Returns the base URL for the document.
Returns the contents of this selection as text.
Returns the contents of this selection as markup.
Returns the selection offset within the end node.
Returns the selection offset within the start node.
Returns true if a portion of the document is selected.
Returns the node that currently has keyboard focus.
Returns the document element with the specified ID value.
Returns the title of an HTML document.
Returns the HEAD node of an HTML document.
Returns the BODY node of an HTML document.
Returns the root document node.
Returns the document type.
Class used to represent a DOM document. The methods of this class should
only be called on the render process main thread thread.
Method executed for visiting the DOM. The document object passed to this
method represents a snapshot of the DOM at the time this method is
executed. DOM objects are only valid for the scope of this method. Do not
keep references to or attempt to access any DOM objects outside the scope
of this method.
Interface to implement for visiting the DOM. The methods of this class will
be called on the render process main thread.
Returns true if an image representation of drag data is available.
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.
Clear list of filenames.
Add a file that is being dragged into the webview.
Reset the file contents. You should do this before calling
CefBrowserHost::DragTargetDragEnter as the web view does not allow us to
drag in this kind of data.
Set the base URL that the fragment came from.
Set the text/html fragment that is being dragged.
Set the plain text fragment that is being dragged.
Set the metadata associated with the link being dragged.
Set the title associated with the link being dragged.
Set the link URL that is being dragged.
Retrieve the list of file paths that are being dragged into the browser
window.
Retrieve the list of file names that are being dragged into the browser
window.
Write the contents of the file being dragged out of the web view into
|writer|. Returns the number of bytes sent to |writer|. If |writer| is
NULL this method will return the size of the file contents in bytes.
Call GetFileName() to get a suggested name for the file.
Return the name of the file being dragged out of the browser window.
Return the base URL that the fragment came from. This value is used for
resolving relative URLs and may be empty.
Return the text/html fragment that is being dragged.
Return the plain text fragment that is being dragged.
Return the metadata, if any, associated with the link being dragged.
Return the title associated with the link being dragged.
Return the link URL that is being dragged.
Returns true if the drag data is a file.
Returns true if the drag data is a text or html fragment.
Returns true if the drag data is a link.
Returns true if this object is read-only.
Returns a copy of the current object.
Create a new CefDragData object.
Class used to represent drag data. The methods of this class may be called
on any thread.
Returns true if this writer performs work like accessing the file system
which may block. Used as a hint for determining the thread to access the
writer from.
Flush the stream.
Return the current offset position.
Seek to the specified offset position. |whence| may be any one of
SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on
failure.
Write raw binary data.
Create a new CefStreamWriter object for a custom handler.
Create a new CefStreamWriter object for a file.
Class used to write data to a stream. The methods of this class may be
called on any thread.
Return true if this handler performs work like accessing the file system
which may block. Used as a hint for determining the thread to access the
handler from.
Flush the stream.
Return the current offset position.
Seek to the specified offset position. |whence| may be any one of
SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on
failure.
Write raw binary data.
Interface the client can implement to provide a custom stream writer. The
methods of this class may be called on any thread.
Returns true if this reader performs work like accessing the file system
which may block. Used as a hint for determining the thread to access the
reader from.
Return non-zero if at end of file.
Return the current offset position.
Seek to the specified offset position. |whence| may be any one of
SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on
failure.
Read raw binary data.
Create a new CefStreamReader object from a custom handler.
Create a new CefStreamReader object from data.
Create a new CefStreamReader object from a file.
Class used to read data from a stream. The methods of this class may be
called on any thread.
Return true if this handler performs work like accessing the file system
which may block. Used as a hint for determining the thread to access the
handler from.
Return non-zero if at end of file.
Return the current offset position.
Seek to the specified offset position. |whence| may be any one of
SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on
failure.
Read raw binary data.
Interface the client can implement to provide a custom stream reader. The
methods of this class may be called on any thread.
Returns the JPEG representation that most closely matches |scale_factor|.
|quality| determines the compression level with 0 == lowest and 100 ==
highest. The JPEG format does not support alpha transparency and the alpha
channel, if any, will be discarded. |pixel_width| and |pixel_height| are
the output representation size in pixel coordinates. Returns a
CefBinaryValue containing the JPEG image data on success or NULL on
failure.
Returns the PNG representation that most closely matches |scale_factor|.
If |with_transparency| is true any alpha transparency in the image will be
represented in the resulting PNG data. |pixel_width| and |pixel_height|
are the output representation size in pixel coordinates. Returns a
CefBinaryValue containing the PNG image data on success or NULL on
failure.
Returns the bitmap representation that most closely matches
|scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |color_type|
and |alpha_type| values specify the desired output pixel format.
|pixel_width| and |pixel_height| are the output representation size in
pixel coordinates. Returns a CefBinaryValue containing the pixel data on
success or NULL on failure.
Returns information for the representation that most closely matches
|scale_factor|. |actual_scale_factor| is the actual scale factor for the
representation. |pixel_width| and |pixel_height| are the representation
size in pixel coordinates. Returns true on success.
Removes the representation for |scale_factor|. Returns true on success.
Returns true if this image contains a representation for |scale_factor|.
Returns the image height in density independent pixel (DIP) units.
Returns the image width in density independent pixel (DIP) units.
Create a JPEG image representation for |scale_factor|. |jpeg_data| is the
image data of size |jpeg_data_size|. The JPEG format does not support
transparency so the alpha byte will be set to 0xFF for all pixels.
Add a PNG image representation for |scale_factor|. |png_data| is the image
data of size |png_data_size|. Any alpha transparency in the PNG data will
be maintained.
Add a bitmap image representation for |scale_factor|. Only 32-bit
RGBA/BGRA formats are supported. |pixel_width| and |pixel_height| are the
bitmap representation size in pixel coordinates. |pixel_data| is the array
of pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in
size. |color_type| and |alpha_type| values specify the pixel format.
Returns true if this Image and |that| Image share the same underlying
storage. Will also return true if both images are empty.
Returns true if this Image is empty.
Create a new CefImage. It will initially be empty. Use the Add*() methods
to add representations at different scale factors.
Container for a single image represented at different scale factors. All
image representations should be the same size in density independent pixel
(DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels
then the image at scale factor 2.0 should be 200x200 pixels -- both images
will display with a DIP size of 100x100 units. The methods of this class can
be called on any browser process thread.
Sets the value at the specified index as type list. Returns true if the
value was set successfully. If |value| is currently owned by another
object then the value will be copied and the |value| reference will not
change. Otherwise, ownership will be transferred to this object and the
|value| reference will be invalidated.
Sets the value at the specified index as type dict. Returns true if the
value was set successfully. If |value| is currently owned by another
object then the value will be copied and the |value| reference will not
change. Otherwise, ownership will be transferred to this object and the
|value| reference will be invalidated.
Sets the value at the specified index as type binary. Returns true if the
value was set successfully. If |value| is currently owned by another
object then the value will be copied and the |value| reference will not
change. Otherwise, ownership will be transferred to this object and the
|value| reference will be invalidated.
Sets the value at the specified index as type string. Returns true if the
value was set successfully.
Sets the value at the specified index as type double. Returns true if the
value was set successfully.
Sets the value at the specified index as type int. Returns true if the
value was set successfully.
Sets the value at the specified index as type bool. Returns true if the
value was set successfully.
Sets the value at the specified index as type null. Returns true if the
value was set successfully.
Sets the value at the specified index. Returns true if the value was set
successfully. If |value| represents simple data then the underlying data
will be copied and modifications to |value| will not modify this object.
If |value| represents complex data (binary, dictionary or list) then the
underlying data will be referenced and modifications to |value| will
modify this object.
Returns the value at the specified index as type list. The returned
value will reference existing data and modifications to the value will
modify this object.
Returns the value at the specified index as type dictionary. The returned
value will reference existing data and modifications to the value will
modify this object.
Returns the value at the specified index as type binary. The returned
value will reference existing data.
Returns the value at the specified index as type string.
Returns the value at the specified index as type double.
Returns the value at the specified index as type int.
Returns the value at the specified index as type bool.
Returns the value at the specified index. For simple types the returned
value will copy existing data and modifications to the value will not
modify this object. For complex types (binary, dictionary and list) the
returned value will reference existing data and modifications to the value
will modify this object.
Returns the value type at the specified index.
Removes the value at the specified index.
Removes all values. Returns true on success.
Returns the number of values.
Sets the number of values. If the number of values is expanded all
new value slots will default to type null. Returns true on success.
Returns a writable copy of this object.
Returns true if this object and |that| object have an equivalent
underlying value but are not necessarily the same object.
Returns true if this object and |that| object have the same underlying
data. If true modifications to this object will also affect |that| object
and vice-versa.
Returns true if the values of this object are read-only. Some APIs may
expose read-only objects.
Returns true if this object is currently owned by another object.
Returns true if this object is valid. This object may become invalid if
the underlying data is owned by another object (e.g. list or dictionary)
and that other object is then modified or destroyed. Do not call any other
methods if this method returns false.
Creates a new object that is not owned by any other object.
Class representing a list value. Can be used on any process and thread.
Sets the value at the specified key as type list. Returns true if the
value was set successfully. If |value| is currently owned by another
object then the value will be copied and the |value| reference will not
change. Otherwise, ownership will be transferred to this object and the
|value| reference will be invalidated.
Sets the value at the specified key as type dict. Returns true if the
value was set successfully. If |value| is currently owned by another
object then the value will be copied and the |value| reference will not
change. Otherwise, ownership will be transferred to this object and the
|value| reference will be invalidated.
Sets the value at the specified key as type binary. Returns true if the
value was set successfully. If |value| is currently owned by another
object then the value will be copied and the |value| reference will not
change. Otherwise, ownership will be transferred to this object and the
|value| reference will be invalidated.
Sets the value at the specified key as type string. Returns true if the
value was set successfully.
Sets the value at the specified key as type double. Returns true if the
value was set successfully.
Sets the value at the specified key as type int. Returns true if the
value was set successfully.
Sets the value at the specified key as type bool. Returns true if the
value was set successfully.
Sets the value at the specified key as type null. Returns true if the
value was set successfully.
Sets the value at the specified key. Returns true if the value was set
successfully. If |value| represents simple data then the underlying data
will be copied and modifications to |value| will not modify this object.
If |value| represents complex data (binary, dictionary or list) then the
underlying data will be referenced and modifications to |value| will
modify this object.
Returns the value at the specified key as type list. The returned value
will reference existing data and modifications to the value will modify
this object.
Returns the value at the specified key as type dictionary. The returned
value will reference existing data and modifications to the value will
modify this object.
Returns the value at the specified key as type binary. The returned
value will reference existing data.
Returns the value at the specified key as type string.
Returns the value at the specified key as type double.
Returns the value at the specified key as type int.
Returns the value at the specified key as type bool.
Returns the value at the specified key. For simple types the returned
value will copy existing data and modifications to the value will not
modify this object. For complex types (binary, dictionary and list) the
returned value will reference existing data and modifications to the value
will modify this object.
Returns the value type for the specified key.
Removes the value at the specified key. Returns true is the value was
removed successfully.
Reads all keys for this dictionary into the specified vector.
Returns true if the current dictionary has a value for the given key.
Removes all values. Returns true on success.
Returns the number of values.
Returns a writable copy of this object. If |exclude_empty_children| is
true any empty dictionaries or lists will be excluded from the copy.
Returns true if this object and |that| object have an equivalent
underlying value but are not necessarily the same object.
Returns true if this object and |that| object have the same underlying
data. If true modifications to this object will also affect |that| object
and vice-versa.
Returns true if the values of this object are read-only. Some APIs may
expose read-only objects.
Returns true if this object is currently owned by another object.
Returns true if this object is valid. This object may become invalid if
the underlying data is owned by another object (e.g. list or dictionary)
and that other object is then modified or destroyed. Do not call any other
methods if this method returns false.
Creates a new object that is not owned by any other object.
Class representing a dictionary value. Can be used on any process and
thread.
Read up to |buffer_size| number of bytes into |buffer|. Reading begins at
the specified byte |data_offset|. Returns the number of bytes read.
Returns the data size.
Returns a pointer to the beginning of the memory block.
The returned pointer is valid as long as the CefBinaryValue is alive.
Returns a copy of this object. The data in this object will also be
copied.
Returns true if this object and |that| object have an equivalent
underlying value but are not necessarily the same object.
Returns true if this object and |that| object have the same underlying
data.
Returns true if this object is currently owned by another object.
Returns true if this object is valid. This object may become invalid if
the underlying data is owned by another object (e.g. list or dictionary)
and that other object is then modified or destroyed. Do not call any other
methods if this method returns false.
Creates a new object that is not owned by any other object. The specified
|data| will be copied.
Class representing a binary value. Can be used on any process and thread.
Sets the underlying value as type list. Returns true if the value was set
successfully. This object keeps a reference to |value| and ownership of
the underlying data remains unchanged.
Sets the underlying value as type dict. Returns true if the value was set
successfully. This object keeps a reference to |value| and ownership of
the underlying data remains unchanged.
Sets the underlying value as type binary. Returns true if the value was
set successfully. This object keeps a reference to |value| and ownership
of the underlying data remains unchanged.
Sets the underlying value as type string. Returns true if the value was
set successfully.
Sets the underlying value as type double. Returns true if the value was
set successfully.
Sets the underlying value as type int. Returns true if the value was set
successfully.
Sets the underlying value as type bool. Returns true if the value was set
successfully.
Sets the underlying value as type null. Returns true if the value was set
successfully.
Returns the underlying value as type list. The returned reference may
become invalid if the value is owned by another object or if ownership is
transferred to another object in the future. To maintain a reference to
the value after assigning ownership to a dictionary or list pass this
object to the SetValue() method instead of passing the returned reference
to SetList().
Returns the underlying value as type dictionary. The returned reference
may become invalid if the value is owned by another object or if ownership
is transferred to another object in the future. To maintain a reference to
the value after assigning ownership to a dictionary or list pass this
object to the SetValue() method instead of passing the returned reference
to SetDictionary().
Returns the underlying value as type binary. The returned reference may
become invalid if the value is owned by another object or if ownership is
transferred to another object in the future. To maintain a reference to
the value after assigning ownership to a dictionary or list pass this
object to the SetValue() method instead of passing the returned reference
to SetBinary().
Returns the underlying value as type string.
Returns the underlying value as type double.
Returns the underlying value as type int.
Returns the underlying value as type bool.
Returns the underlying value type.
Returns a copy of this object. The underlying data will also be copied.
Returns true if this object and |that| object have an equivalent
underlying value but are not necessarily the same object.
Returns true if this object and |that| object have the same underlying
data. If true modifications to this object will also affect |that| object
and vice-versa.
Returns true if the underlying data is read-only. Some APIs may expose
read-only objects.
Returns true if the underlying data is owned by another object.
Returns true if the underlying data is valid. This will always be true for
simple types. For complex types (binary, dictionary and list) the
underlying data may become invalid if owned by another object (e.g. list
or dictionary) and that other object is then modified or destroyed. This
value object can be re-used by calling Set*() even if the underlying data
is invalid.
Creates a new object.
Class that wraps other data value types. Complex types (binary, dictionary
and list) will be referenced but not owned by this object. Can be used on
any process and thread.
Method that will be called when the DevTools agent has detached. |browser|
is the originating browser instance. Any method results that were pending
before the agent became detached will not be delivered, and any active
event subscriptions will be canceled.
Method that will be called when the DevTools agent has attached. |browser|
is the originating browser instance. This will generally occur in response
to the first message sent while the agent is detached.
Method that will be called on receipt of a DevTools protocol event.
|browser| is the originating browser instance. |method| is the "method"
value. |params| is the UTF8-encoded JSON "params" dictionary value (which
may be empty). |params| is only valid for the scope of this callback and
should be copied if necessary. See the OnDevToolsMessage documentation for
additional details on |params| contents.
Method that will be called after attempted execution of a DevTools
protocol method. |browser| is the originating browser instance.
|message_id| is the "id" value that identifies the originating method call
message. If the method succeeded |success| will be true and |result| will
be the UTF8-encoded JSON "result" dictionary value (which may be empty).
If the method failed |success| will be false and |result| will be the
UTF8-encoded JSON "error" dictionary value. |result| is only valid for the
scope of this callback and should be copied if necessary. See the
OnDevToolsMessage documentation for additional details on |result|
contents.
Method that will be called on receipt of a DevTools protocol message.
|browser| is the originating browser instance. |message| is a UTF8-encoded
JSON dictionary representing either a method result or an event. |message|
is only valid for the scope of this callback and should be copied if
necessary. Return true if the message was handled or false if the message
should be further processed and passed to the OnDevToolsMethodResult or
OnDevToolsEvent methods as appropriate.
Method result dictionaries include an "id" (int) value that identifies the
orginating method call sent from CefBrowserHost::SendDevToolsMessage, and
optionally either a "result" (dictionary) or "error" (dictionary) value.
The "error" dictionary will contain "code" (int) and "message" (string)
values. Event dictionaries include a "method" (string) value and
optionally a "params" (dictionary) value. See the DevTools protocol
documentation at https://chromedevtools.github.io/devtools-protocol/ for
details of supported method calls and the expected "result" or "params"
dictionary contents. JSON dictionaries can be parsed using the
CefParseJSON function if desired, however be aware of performance
considerations when parsing large messages (some of which may exceed 1MB
in size).
Callback interface for CefBrowserHost::AddDevToolsMessageObserver. The
methods of this class will be called on the browser process UI thread.
Set to true before calling Windows APIs like TrackPopupMenu that enter a
modal message loop. Set to false after exiting the modal message loop.
Run the main thread on 32-bit Windows using a fiber with the preferred 4MiB
stack size. This function must be called at the top of the executable entry
point function (`main()` or `wWinMain()`). It is used in combination with
the initial stack size of 0.5MiB configured via the `/STACK:0x80000` linker
flag on executable targets. This saves significant memory on threads (like
those in the Windows thread pool, and others) whose stack size can only be
controlled via the linker flag.
CEF's main thread needs at least a 1.5 MiB stack size in order to avoid
stack overflow crashes. However, if this is set in the PE file then other
threads get this size as well, leading to address-space exhaustion in 32-bit
CEF. This function uses fibers to switch the main thread to a 4 MiB stack
(roughly the same effective size as the 64-bit build's 8 MiB stack) before
running any other code.
Choose the function variant that matches the entry point function type used
by the executable. Reusing the entry point minimizes confusion when
examining call stacks in crash reports.
If this function is already running on the fiber it will return -1
immediately, meaning that execution should proceed with the remainder of the
entry point function. Otherwise, this function will block until the entry
point function has completed execution on the fiber and then return a result
>= 0, meaning that the entry point function should return the result
immediately without proceeding with execution.
Create the browser using windowless (off-screen) rendering. No window
will be created for the browser and all rendering will occur via the
CefRenderHandler interface. The |parent| value will be used to identify
monitor info and to act as the parent window for dialogs, context menus,
etc. If |parent| is not provided then the main screen monitor will be used
and some functionality that requires a parent window may not function
correctly. In order to create windowless browsers the
CefSettings.windowless_rendering_enabled value must be set to true.
Transparent painting is enabled by default but can be disabled by setting
CefBrowserSettings.background_color to an opaque value.
Create the browser as a popup window.
Create the browser as a child window.
Class representing window information.
Class representing CefExecuteProcess arguments.
Set to true (1) before calling Windows APIs like TrackPopupMenu that enter a
modal message loop. Set to false (0) after exiting the modal message loop.
Run the main thread on 32-bit Windows using a fiber with the preferred 4MiB
stack size. This function must be called at the top of the executable entry
point function (`main()` or `wWinMain()`). It is used in combination with
the initial stack size of 0.5MiB configured via the `/STACK:0x80000` linker
flag on executable targets. This saves significant memory on threads (like
those in the Windows thread pool, and others) whose stack size can only be
controlled via the linker flag.
CEF's main thread needs at least a 1.5 MiB stack size in order to avoid
stack overflow crashes. However, if this is set in the PE file then other
threads get this size as well, leading to address-space exhaustion in 32-bit
CEF. This function uses fibers to switch the main thread to a 4 MiB stack
(roughly the same effective size as the 64-bit build's 8 MiB stack) before
running any other code.
Choose the function variant that matches the entry point function type used
by the executable. Reusing the entry point minimizes confusion when
examining call stacks in crash reports.
If this function is already running on the fiber it will return -1
immediately, meaning that execution should proceed with the remainder of the
entry point function. Otherwise, this function will block until the entry
point function has completed execution on the fiber and then return a result
>= 0, meaning that the entry point function should return the result
immediately without proceeding with execution.
Class representing CefBoxLayout settings.
Class representing cursor information.
Class representing a touch event.
Class representing a mouse event.
Class representing the virtual screen information for use when window
rendering is disabled.
Class representing a draggable region.
Class representing insets.
Class representing a range.
Class representing a size.
Returns true if the point identified by point_x and point_y falls inside
this rectangle. The point (x, y) is inside the rectangle, but the
point (x + width, y + height) is not.
Class representing a rectangle.
Class representing a point.
Set to true (1) if this task process' GPU resource count is inflated
because it is counting other processes' resources (e.g, the GPU process
has this value set to true because it is the aggregate of all processes).
The GPU memory usage of the task in bytes. A value of -1 means no valid
value is currently available.
The memory footprint of the task in bytes. A value of -1 means no valid
value is currently available.
The number of processors available on the system.
The CPU usage of the process on which the task is running. The value is
in the range zero to number_of_processors * 100%.
The task title.
Set to true (1) if the task is killable.
The task type.
The task ID.
Size of this structure.
Structure representing task information provided by CefTaskManager.
A service worker running on the renderer process.
A shared worker running on the renderer process.
A dedicated worker running on the renderer process.
A sandbox helper process
A plugin process.
A browser plugin guest process.
An extension or app process.
A normal WebContents renderer process.
A browser utility process.
A Linux zygote process.
A graphics process.
The main browser process.
The browser crashed.
Internal use only: resume pending downloads if possible.
The user shut down the browser.
Internal use only: resume pending downloads if possible.
The user canceled the download.
An unexpected cross-origin redirect happened.
The server sent fewer bytes than the content-length header. It may
indicate that the connection was closed prematurely, or the Content-Length
header was invalid. The download is only interrupted if strong validators
are present. Otherwise, it is treated as finished.
Unexpected server response. This might indicate that the responding server
may not be the intended server.
Server access forbidden.
Server certificate problem.
Server didn't authorize access to resource.
The server does not have the requested data.
The server does not support range requests.
Internal use only: must restart from the beginning.
The server indicates that the operation has failed (generic).
The network request was invalid. This may be due to the original URL or a
redirected URL:
- Having an unsupported scheme.
- Being an invalid URL.
- Being disallowed by policy.
The server has gone down.
The network connection has been lost.
The network operation timed out.
Generic network failure.
The source and the target of the download were the same.
The partial file didn't match the expected hash.
An attempt was made to seek past the end of a file in opening
a file (as part of resuming a previously interrupted download).
An attempt to check the safety of the download failed due to unexpected
reasons. See http://crbug.com/153212.
The file was blocked due to local policy.
The file was in use. Too many files are opened at once. We have run out of
memory.
The file contains a virus.
The file is too large for the file system to handle.
The directory or file name is too long.
There is not enough room on the drive.
The file cannot be accessed due to security restrictions.
Generic file operation failure.
Request context preferences registered each time a new CefRequestContext
is created.
Global preferences registered a single time at application startup.
Expired certificate. Loads the "expired_cert.pem" file.
Valid certificate using the domain ("localhost"). Loads the
"localhost_cert.pem" file.
Valid certificate using the IP (127.0.0.1). Loads the "ok_cert.pem" file.
Ignore the permission request. If the prompt remains unhandled (e.g.
OnShowPermissionPrompt returns false and there is no default permissions
UI) then any related promises may remain unresolved.
Dismiss the permission request as an explicit user action.
Deny the permission request as an explicit user action.
Accept the permission request as an explicit user action.
Desktop video capture permission.
Desktop audio capture permission.
Device video capture permission.
Device audio capture permission.
No permission.
Alpha state. Only set if |flags| contains CEF_THS_FLAG_ALPHA.
Origin state. Only set if |flags| contains CEF_THS_FLAG_ORIGIN.
Orientation state. Only set if |flags| contains CEF_THS_FLAG_ORIENTATION.
Enabled state. Only set if |flags| contains CEF_THS_FLAG_ENABLED.
Combination of cef_touch_handle_state_flags_t values indicating what state
is set.
Touch handle id. Increments for each new touch handle.
Size of this structure.
Size of this structure.
Device information for a MediaSink object.
Number of frames per buffer
Sample rate
Layout of the audio channels
Size of this structure.
Structure representing the audio parameters for setting up the audio
handler.
Front L, Front R, LFE, Back C
Front C, LFE
Front L, Front R, Front C, LFE, Side L, Side R,
Front Height L, Front Height R, Rear Height L, Rear Height R
Will be represented as six channels (5.1) due to eight channel limit
kMaxConcurrentChannels
Actual channel layout is specified in the bitstream and the actual channel
count is unknown at Chromium media pipeline level (useful for audio
pass-through mode).
Front L, Front R, LFE, Side L, Side R
Deprecated, but keeping the enum value for UMA consistency.
Front L, Front R, Front C. Front C contains the keyboard mic audio. This
layout is only intended for input for WebRTC. The Front C channel
is stripped away in the WebRTC audio input pipeline and never seen outside
of that.
Channels are not explicitly mapped to speakers.
Front L, Front R, Front C, Back L, Back R, Back C, Side L, Side R
Front L, Front R, Front C, LFE, Back L, Back R, Front LofC, Front RofC
Front L, Front R, Front C, Front LofC, Front RofC, Side L, Side R
Front L, Front R, LFE, Front LofC, Front RofC, Side L, Side R
Front L, Front R, Front C, LFE, Back L, Back R, Back C
Front L, Front R, Front C, LFE, Back C, Side L, Side R
Front L, Front R, Front C, Back L, Back R, Back C
Front L, Front R, Front LofC, Front RofC, Side L, Side R
Front L, Front R, Front C, Back C, Side L, Side R
Front L, Front R, Front C, LFE, Back C
Front L, Front R, Front C, LFE
Front L, Front R, LFE
Front L, Front R
Front L, Front R, Front C, LFE, Front LofC, Front RofC, Side L, Side R
Front L, Front R, Front C, LFE, Back L, Back R, Side L, Side R
Front L, Front R, Front C, Back L, Back R, Side L, Side R
Front L, Front R, Front C, LFE, Back L, Back R
Front L, Front R, Front C, Back L, Back R
Front L, Front R, Front C, LFE, Side L, Side R
Front L, Front R, Front C, Side L, Side R
Front L, Front R, Back L, Back R
Front L, Front R, Side L, Side R
Front L, Front R, Front C, Back C
Front L, Front R, Front C
Front L, Front R, Back C
Front L, Front R
Front C
Style.
Set to true (1) for thick underline.
Background color.
Text color.
Underline character range.
Size of this structure.
Structure representing IME composition underline information. This is a thin
wrapper around Blink's WebCompositionUnderline class and should be kept in
sync with that.
Structure representing a range.
If CEF_SCHEME_OPTION_FETCH_ENABLED is set the scheme can perform Fetch API
requests.
If CEF_SCHEME_OPTION_CSP_BYPASSING is set the scheme can bypass Content-
Security-Policy (CSP) checks. This value should not be set in most cases
where CEF_SCHEME_OPTION_STANDARD is set.
If CEF_SCHEME_OPTION_CORS_ENABLED is set the scheme can be sent CORS
requests. This value should be set in most cases where
CEF_SCHEME_OPTION_STANDARD is set.
If CEF_SCHEME_OPTION_SECURE is set the scheme will be treated with the
same security rules as those applied to "https" URLs. For example, loading
this scheme from other secure schemes will not trigger mixed content
warnings.
If CEF_SCHEME_OPTION_DISPLAY_ISOLATED is set the scheme can only be
displayed from other content hosted with the same scheme. For example,
pages in other origins cannot create iframes or hyperlinks to URLs with
the scheme. For schemes that must be accessible from other schemes don't
set this, set CEF_SCHEME_OPTION_CORS_ENABLED, and use CORS
"Access-Control-Allow-Origin" headers to further restrict access.
If CEF_SCHEME_OPTION_LOCAL is set the scheme will be treated with the same
security rules as those applied to "file" URLs. Normal pages cannot link
to or access local URLs. Also, by default, local URLs can only perform
XMLHttpRequest calls to the same URL (origin + path) that originated the
request. To allow XMLHttpRequest calls from a local URL to other URLs with
the same origin set the CefSettings.file_access_from_file_urls_allowed
value to true (1). To allow XMLHttpRequest calls from a local URL to all
origins set the CefSettings.universal_access_from_file_urls_allowed value
to true (1).
If CEF_SCHEME_OPTION_STANDARD is set the scheme will be treated as a
standard scheme. Standard schemes are subject to URL canonicalization and
parsing rules as defined in the Common Internet Scheme Syntax RFC 1738
Section 3.1 available at http://www.ietf.org/rfc/rfc1738.txt
In particular, the syntax for standard scheme URLs must be of the form:
[scheme]://[username]:[password]@[host]:[port]/[url-path]
Standard scheme URLs must have a host component that is a fully
qualified domain name as defined in Section 3.5 of RFC 1034 [13] and
Section 2.1 of RFC 1123. These URLs will be canonicalized to
"scheme://host/path" in the simplest case and
"scheme://username:password@host:port/path" in the most explicit case. For
example, "scheme:host/path" and "scheme:///host/path" will both be
canonicalized to "scheme://host/path". The origin of a standard scheme URL
is the combination of scheme, host and port (i.e., "scheme://host:port" in
the most explicit case).
For non-standard scheme URLs only the "scheme:" component is parsed and
canonicalized. The remainder of the URL will be passed to the handler as-
is. For example, "scheme:///some%20text" will remain the same.
Non-standard scheme URLs cannot be used as a target for form submission.
Unknown SSL version.
Align the text's right edge with that of its display area.
Align the text's center with that of its display area.
Align the text's left edge with that of its display area.
Default flex for views when none is specified via CefBoxLayout methods.
Using the preferred size as the basis, free space along the main axis is
distributed to views in the ratio of their flex weights. Similarly, if the
views will overflow the parent, space is subtracted in these ratios. A
flex of 0 means this view is not resized. Flex values must not be
negative.
Minimum cross axis size.
Specifies where along the cross axis the child views should be laid out.
Specifies where along the main axis the child views should be laid out.
Adds additional space between child views.
Adds additional space around the child view area.
Adds additional vertical space between the child view area and the host
view border.
Adds additional horizontal space between the child view area and the host
view border.
If true (1) the layout will be horizontal, otherwise the layout will be
vertical.
Size of this structure.
Settings used when initializing a CefBoxLayout.
Child views will be stretched to fit.
Child views will be right/bottom-aligned.
Child views will be center-aligned.
Child views will be left/top-aligned.
Transparency with post-multiplied alpha component.
Transparency with pre-multiplied alpha component.
No transparency. The alpha component is ignored.
An error occurred during filtering.
Some or all of the pre-filter data was read successfully and all available
filtered output has been written.
Some or all of the pre-filter data was read successfully but more data is
needed in order to continue filtering (filtered output is pending).
Always the last value in this enumeration.
Always clear the referrer regardless of the request destination.
Strip the referrer down to the origin, but clear it entirely if the
referrer value is HTTPS and the destination is HTTP.
Clear the referrer when the request's referrer is cross-origin with the
request's destination.
Strip the referrer down to the origin regardless of the redirect location.
Never change the referrer.
Strip the referrer down to an origin when the origin of the referrer is
different from the destination's origin.
A slight variant on CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE:
If the request destination is HTTP, an HTTPS referrer will be cleared. If
the request's destination is cross-origin with the referrer (but does not
downgrade), the referrer's granularity will be stripped down to an origin
rather than a full URL. Same-origin requests will send the full referrer.
Clear the referrer header if the header value is HTTPS but the request
destination is HTTP. This is the default behavior.
Set to true (1) to generate a document outline.
Set to true (1) to generate tagged (accessible) PDF.
HTML template for the print footer. Only displayed if
|display_header_footer| is true (1). Uses the same format as
|header_template|.
Set to true (1) to display the header and/or footer. Modify
|header_template| and/or |footer_template| to customize the display.
Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed
in the document order, not in the order specified, and no more than once.
Defaults to empty string, which implies the entire document is printed.
The page numbers are quietly capped to actual page count of the document,
and ranges beyond the end of the document are ignored. If this results in
no pages to print, an error is reported. It is an error to specify a range
with start greater than end.
Margins in inches. Only used if |margin_type| is set to
PDF_PRINT_MARGIN_CUSTOM.
Margin type.
Set to true (1) to prefer page size as defined by css. Defaults to false
(0), in which case the content will be scaled to fit the paper size.
Output paper size in inches. If either of these values is less than or
equal to zero then the default paper size (letter, 8.5 x 11 inches) will
be used.
The percentage to scale the PDF by before printing (e.g. .5 is 50%).
If this value is less than or equal to zero the default value of 1.0
will be used.
Set to true (1) to print background graphics.
Set to true (1) for landscape mode or false (0) for portrait mode.
Size of this structure.
Structure representing PDF print settings. These values match the parameters
supported by the DevTools Page.printToPDF function. See
https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
Custom margins using the |margin_*| values from cef_pdf_print_settings_t.
No margins.
Default margins of 1cm (~0.4 inches).
Return a slightly nicer formatted json string (pads with whitespace to
help with readability).
This option instructs the writer to write doubles that have no fractional
part as a normal integer (i.e., without using exponential notation
or appending a '.0') as long as the value is within the range of a
64-bit int.
This option instructs the writer that if a Binary value is encountered,
the value (and key if within a dictionary) will be omitted from the
output, and success will be returned. Otherwise, if a binary value is
encountered, failure will be returned.
Default behavior.
Allows commas to exist after the last element in structures.
Parses the input strictly according to RFC 4627. See comments in
Chromium's base/json/json_reader.h file for known limitations/
deviations from the RFC.
URL queries use "+" for space. This flag controls that replacement.
Unescapes '/' and '\\'. If these characters were unescaped, the resulting
URL won't be the same as the source one. Moreover, they are dangerous to
unescape in strings that will be used as file paths or names. This value
should only be used when slashes don't have special meaning, like data
URLs.
Convert %20 to spaces. In some places where we're showing URLs, we may
want this. In places where the URL may be copied and pasted out, then
you wouldn't want this since it might not be interpreted in one piece
by other applications.
Don't unescape anything special, but all normal unescaping will happen.
This is a placeholder and can't be combined with other flags (since it's
just the absence of them). All other unescape rules imply "normal" in
addition to their special meaning. Things like escaped letters, digits,
and most symbols will get unescaped with this mode.
Don't unescape anything at all.
Structure representing cursor information. |buffer| will be
|size.width|*|size.height|*4 bytes in size and represents a BGRA image with
an upper-left origin.
Allows picking a nonexistent file, and prompts to overwrite if the file
already exists.
Like Open, but selects a folder to open.
Like Open, but allows picking multiple files to open.
Requires that the file exists before allowing the user to pick it.
True (1) if browser interface elements should be hidden.
Size of this structure.
Popup window features.
The source is a system-generated focus event.
The source is explicit navigation via the API (LoadURL(), etc).
True if the focus is currently on an editable field on the page. This is
useful for determining if standard key events should be intercepted.
Same as |character| but unmodified by any concurrently-held modifiers
(except shift). This is useful for working out shortcut keys.
The character generated by the keystroke.
Indicates whether the event is considered a "system key" event (see
http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details).
This value will always be false on non-Windows platforms.
The actual key code genenerated by the platform.
The Windows key code for the key event. This value is used by the DOM
specification. Sometimes it comes directly from the event (i.e. on
Windows) and sometimes it's determined using a mapping function. See
WebCore/platform/chromium/KeyboardCodes.h for the list of values.
Bit flags describing any pressed modifier keys. See
cef_event_flags_t for values.
The type of keyboard event.
Size of this structure.
Structure representing keyboard event information.
Notification that a character was typed. Use this for text input. Key
down events may generate 0, 1, or more than one character event depending
on the key, locale, and operating system.
Notification that a key was released.
Notification that a key was pressed. This does not necessarily correspond
to a character depending on the key and language. Use KEYEVENT_CHAR for
character input.
Notification that a key transitioned from "up" to "down".
A plugin node is selected.
A file node is selected.
An canvas node is selected.
An audio node is selected.
A video node is selected.
An image node is selected.
No special node is in context.
An editable element is selected.
There is a textual or mixed selection that is selected.
A media node is selected.
A link is selected.
A subframe page is selected.
The top page is selected.
No node is selected.
Mac OS-X command key.
The device type that caused the event.
Bit flags describing any pressed modifier keys. See
cef_event_flags_t for values.
The state of the touch point. Touches begin with one CEF_TET_PRESSED event
followed by zero or more CEF_TET_MOVED events and finally one
CEF_TET_RELEASED or CEF_TET_CANCELLED event. Events not respecting this
order will be ignored.
The normalized pressure of the pointer input in the range of [0,1].
Set to 0 if not applicable.
Rotation angle in radians. Set to 0 if not applicable.
Y radius in pixels. Set to 0 if not applicable.
X radius in pixels. Set to 0 if not applicable.
Y coordinate relative to the top side of the view.
X coordinate relative to the left side of the view.
Id of a touch point. Must be unique per touch, can be any number except
-1. Note that a maximum of 16 concurrent touches will be tracked; touches
beyond that will be ignored.
Structure representing touch event information.
Bit flags describing any pressed modifier keys. See
cef_event_flags_t for values.
Y coordinate relative to the top side of the view.
X coordinate relative to the left side of the view.
Structure representing mouse event information.
Main window's WM_WINDOW_ROLE in X11
Main window's WM_CLASS_NAME in X11
Main window's WM_CLASS_CLASS in X11
Main window's Wayland's app_id
Size of this structure.
Linux window properties, such as X11's WM_CLASS or Wayland's app_id.
Those are passed to CefWindowDelegate, so the client can set them
for the CefWindow's top-level. Thus, allowing window managers to correctly
display the application's information (e.g., icons).
This is set from the rcWork member of MONITORINFOEX, to whit:
"A RECT structure that specifies the work area rectangle of the
display monitor that can be used by applications, expressed in
virtual-screen coordinates. Windows uses this rectangle to
maximize an application on the monitor. The rest of the area in
rcMonitor contains system windows such as the task bar and side
bars. Note that if the monitor is not the primary display monitor,
some of the rectangle's coordinates may be negative values".
The |rect| and |available_rect| properties are used to determine the
available surface for rendering popup views.
This is set from the rcMonitor member of MONITORINFOEX, to whit:
"A RECT structure that specifies the display monitor rectangle,
expressed in virtual-screen coordinates. Note that if the monitor
is not the primary display monitor, some of the rectangle's
coordinates may be negative values."
The |rect| and |available_rect| properties are used to determine the
available surface for rendering popup views.
This can be true for black and white printers.
The bits per color component. This assumes that the colors are balanced
equally.
The screen depth in bits per pixel.
Device scale factor. Specifies the ratio between physical and logical
pixels.
Size of this structure.
Screen information used when window rendering is disabled. This structure is
passed as a parameter to CefRenderHandler::GetScreenInfo and should be
filled in by the client.
Initialize COM using multi-threaded apartments.
Initialize COM using single-threaded apartments.
No COM initialization.
Supports tasks, timers and asynchronous IO events.
Supports tasks, timers and native UI events (e.g. Windows messages).
Supports tasks and timers.
Suitable for low-latency, glitch-resistant audio.
Suitable for threads which generate data for the display (at ~60Hz).
Default priority level.
Suitable for threads that shouldn't disrupt high priority work.
The main thread in the renderer. Used for all WebKit and V8 interaction.
Tasks may be posted to this thread after
CefRenderProcessHandler::OnWebKitInitialized but are not guaranteed to
run before sub-process termination (sub-processes may be killed at any
time without warning).
Used to process IPC and network messages. Do not perform blocking tasks on
this thread. All tasks posted after
CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
are guaranteed to run.
Used to launch and terminate browser processes.
Used for blocking tasks like file system access that affect UI
immediately after a user interaction. All tasks posted after
CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
are guaranteed to run.
Example: Generating data shown in the UI immediately after a click.
Used for blocking tasks like file system access that affect UI or
responsiveness of future user interactions. Do not use if an immediate
response to a user interaction is expected. All tasks posted after
CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
are guaranteed to run.
Examples:
- Updating the UI to reflect progress on a long task.
- Loading data that might be shown in the UI after a future user
interaction.
Used for blocking tasks like file system access where the user won't
notice if the task takes an arbitrarily long time to complete. All tasks
posted after CefBrowserProcessHandler::OnContextInitialized() and before
CefShutdown() are guaranteed to run.
The main thread in the browser. This will be the same as the main
application thread if CefInitialize() is called with a
CefSettings.multi_threaded_message_loop value of false. Do not perform
blocking tasks on this thread. All tasks posted after
CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown()
are guaranteed to run. This thread will outlive all other CEF threads.
Renderer process.
Browser process.
True (1) this this region is draggable and false (0) otherwise.
Bounds of the region.
Structure representing a draggable region.
Request failed for some reason.
Request was canceled programatically.
An IO request is pending, and the caller will be informed when it is
completed.
Request succeeded.
Unknown status.
If set 3XX responses will cause the fetch to halt immediately rather than
continue through the redirect.
If set 5XX redirect errors will be propagated to the observer instead of
automatically re-tried. This currently only applies for requests
originated in the browser process.
If set the CefURLRequestClient::OnDownloadData method will not be called.
If set upload progress events will be generated when a request has a body.
If set user name, password, and cookies may be sent with the request, and
cookies may be saved from the response.
If set the cache will not be used at all. Setting this value is equivalent
to specifying the "Cache-Control: no-store" request header. Setting this
value in combination with UR_FLAG_ONLY_FROM_CACHE will cause the request
to fail.
If set the request will fail if it cannot be served from the cache (or
some equivalent local store). Setting this value is equivalent to
specifying the "Cache-Control: only-if-cached" request header. Setting
this value in combination with UR_FLAG_SKIP_CACHE or UR_FLAG_DISABLE_CACHE
will cause the request to fail.
If set the cache will be skipped when handling the request. Setting this
value is equivalent to specifying the "Cache-Control: no-cache" request
header. Setting this value in combination with UR_FLAG_ONLY_FROM_CACHE
will cause the request to fail.
Default behavior.
General mask defining the bits used for the qualifiers.
Used to test whether a transition involves a redirect.
Redirects sent from the server by HTTP headers.
Redirects caused by JavaScript or a meta refresh tag on the page.
The last transition in a redirect chain.
The beginning of a navigation chain.
The transition originated from an external application; the exact
definition of this is embedder dependent. Chrome style only.
User is navigating to the home page. Chrome style only.
Loaded a URL directly via CreateBrowser, LoadURL or LoadRequest.
Used the Forward or Back function to navigate among browsing history.
Will be ORed to the transition type for the original load.
Qualifiers.
Any of the core values above can be augmented by one or more qualifiers.
These qualifiers further define the transition.
Attempted to visit a URL but was blocked.
General mask defining the bits used for the source values.
Corresponds to a visit generated for a keyword. See description of
TT_KEYWORD for more details. Chrome style only.
The url was generated from a replaceable keyword other than the default
search provider. If the user types a keyword (which also applies to
tab-to-search) in the omnibox this qualifier is applied to the transition
type of the generated url. TemplateURLModel then may generate an
additional visit with a transition type of TT_KEYWORD_GENERATED against
the url 'http://' + keyword. For example, if you do a tab-to-search
against wikipedia the generated url has a transition qualifer of
TT_KEYWORD, and TemplateURLModel generates a visit for 'wikipedia.org'
with a transition type of TT_KEYWORD_GENERATED. Chrome style only.
Source is a "reload" of the page via the Reload function or by re-visiting
the same URL. NOTE: This is distinct from the concept of whether a
particular load uses "reload semantics" (i.e. bypasses cached data).
Source is a form submission by the user. NOTE: In some situations
submitting a form does not result in this transition type. This can happen
if the form uses a script to submit the contents.
This is a toplevel navigation. This is any content that is automatically
loaded in a toplevel frame. For example, opening a tab to show the ASH
screen saver, opening the devtools window, opening the NTP after the safe
browsing warning, opening web-based dialog boxes are examples of
AUTO_TOPLEVEL navigations. Chrome style only.
User got to this page by typing in the URL bar and selecting an entry
that did not look like a URL. For example, a match might have the URL
of a Google search result page, but appear like "Search Google for ...".
These are not quite the same as EXPLICIT navigations because the user
didn't type or see the destination URL. Chrome style only.
See also TT_KEYWORD.
Source is a subframe navigation explicitly requested by the user that will
generate new navigation entries in the back/forward list. These are
probably more important than frames that were automatically loaded in
the background because the user probably cares about the fact that this
link was loaded.
Source is a subframe navigation. This is any content that is automatically
loaded in a non-toplevel frame. For example, if a page consists of several
frames containing ads, those ad URLs will have this transition type.
The user may not even realize the content in these pages is a separate
frame, so may not care about the URL.
User got to this page through a suggestion in the UI (for example, via the
destinations page). Chrome style only.
Source is some other "explicit" navigation. This is the default value for
navigations where the actual type is unknown. See also
TT_DIRECT_LOAD_FLAG.
Source is a link click or the JavaScript window.open function. This is
also the default value for requests like sub-resource loads that are not
navigations.
A sub-frame service worker navigation preload request.
A main-frame service worker navigation preload request.
A resource that a plugin requested.
A report of Content Security Policy violations.
Main resource of a service worker.
XMLHttpRequest.
Favicon.
Explicitly requested prefetch.
Main resource of a shared worker.
Main resource of a dedicated worker.
Media resource.
Object (or embed) tag for a plugin, or a resource that a plugin requested.
Some other subresource. This is the default type if the actual type is
unknown.
Font.
Image (jpg/gif/png/etc).
External script.
CSS stylesheet.
Frame or iframe.
Top level page.
Not configurable
Not enumerable
Not writeable
Writeable, Enumerable, Configurable
Creates a new document picture-in-picture window showing a child WebView.
Activates an existing tab containing the url, rather than navigating.
This is similar to SINGLETON_TAB, but searches across all windows from
the current profile and anonymity (instead of just the current one);
closes the current tab on switching if the current tab was the NTP with
no session history; and behaves like CURRENT_TAB instead of
NEW_FOREGROUND_TAB when no existing tab is found.
Special case error condition from the renderer.
New off-the-record (incognito) window.
Alt key while clicking.
Shift key while clicking.
New popup window.
Middle mouse button or meta/ctrl key while clicking.
Shift key + Middle mouse button or meta/ctrl key while clicking.
Indicates that only one tab with the url should exist in the same window.
Current tab. This is the default in most cases.
Windows sandbox failed to warmup.
Windows sandbox exceeded the job memory limit.
Windows sandbox could not set the mitigation policy.
Windows sandbox failed to close pending handles.
Windows sandbox failed to forbid HCKU caching.
Windows sandbox failed to flush registry handles.
Windows sandbox could not lower the token.
Windows sandbox could not set the integrity level.
The browser process exited because system resources are exhausted. The
system state can't be recovered and will be unstable.
An early startup command was executed and the browser must exit.
The GPU process was terminated due to context lost.
Cloud policy enrollment failed or was given up by user.
A browser process was sandboxed. This should never happen.
The browser process exited early by passing the command line to another
running browser.
Failed to pack an extension via the command line.
The profile was in use on another host.
Command line parameter is not supported.
A critical chrome file is missing.
The GPU process exited because initialization failed.
A bad message caused the process termination.
Process hung.
Process was killed by user or system.
Directory containing application resources. Can be configured via
CefSettings.resources_dir_path.
"Application Data" directory under the user profile directory on Windows
and "~/Library/Application Support" directory on MacOS.
"Local Settings\Application Data" directory under the user profile
directory on Windows.
Path and filename of the module containing the CEF code (usually the
libcef module).
Path and filename of the current executable.
Temporary directory.
Directory containing PK_FILE_MODULE.
Directory containing PK_FILE_EXE.
Current directory.
On Windows, the OS terminated the process due to code integrity failure.
Child process never launched.
Out of memory. Some platforms may use TS_PROCESS_CRASHED instead.
Segmentation fault.
SIGKILL or task manager kill.
Non-zero exit status.
Priority.
Same site.
The cookie expiration date is only valid if |has_expires| is true.
The cookie last access date. This is automatically populated by the system
on access.
The cookie creation date. This is automatically populated by the system on
cookie creation.
If |httponly| is true the cookie will only be sent for HTTP requests.
If |secure| is true the cookie will only be sent for HTTPS requests.
If |path| is non-empty only URLs at or below the path will get the cookie
value.
If |domain| is empty a host cookie will be created instead of a domain
cookie. Domain cookies are stored with a leading "." and are visible to
sub-domains whereas host cookies are not.
The cookie value.
The cookie name.
Size of this structure.
Cookie information.
Fragment (hash) identifier component (i.e., the string following the '#').
Query string component (i.e., everything following the '?').
Path component including the first slash following the host.
Origin contains just the scheme, host, and port from a URL. Equivalent to
clearing any username and password, replacing the path with a slash, and
clearing everything after that. This value will be empty for non-standard
URLs.
Port number component.
Host component. This may be a hostname, an IPv4 address or an IPv6 literal
surrounded by square brackets (e.g., "[2001:db8::1]").
Password component.
User name component.
Scheme component not including the colon (e.g., "http").
The complete URL specification.
Size of this structure.
URL component parts.
Continue asynchronously (usually via a callback).
Continue immediately.
Cancel immediately.
Controls whether the Chrome zoom bubble will be shown when zooming. Only
supported with Chrome style.
Controls whether the Chrome status bubble will be used. Only supported
with Chrome style. For details about the status bubble see
https://www.chromium.org/user-experience/status-bubble/
END values that map to WebPreferences settings.
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 windowed browser then the
CefSettings.background_color value will be used. If the alpha component is
fully transparent for a windowless (off-screen) 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 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 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 or that have no back/forward history. Also
configurable using the "disable-javascript-close-windows" command-line
switch.
Controls whether JavaScript can be executed. 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.
BEGIN values that map to WebPreferences settings.
Font settings.
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 CefBrowserHost::SetWindowlessFrameRate.
Size of this structure.
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.
Comma delimited list of schemes supported by the associated
CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0)
the default schemes ("http", "https", "ws" and "wss") will also be
supported. Not specifying a |cookieable_schemes_list| value and setting
|cookieable_schemes_exclude_defaults| to true (1) will disable all loading
and saving of cookies. These values will be ignored if |cache_path|
matches the CefSettings.cache_path value.
Comma delimited ordered list of language codes without any whitespace that
will be used in the "Accept-Language" HTTP request header and
"navigator.language" JS attribute. Can be set globally using the
CefSettings.accept_language_list value. If all values are empty then
"en-US,en" will be used. This value will be ignored if |cache_path|
matches the CefSettings.cache_path 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 (1). Session cookies are generally intended to be transient and
most Web browsers do not persist them. Can be set globally using the
CefSettings.persist_session_cookies value. This value will be ignored if
|cache_path| is empty or if it matches the CefSettings.cache_path value.
The directory where cache data for this request context will be stored on
disk. If this value is non-empty then it must be an absolute path that is
either equal to or a child directory of CefSettings.root_cache_path. If
this value is empty then browsers will be created in "incognito mode"
where in-memory caches are used for storage and no profile-specific data
is persisted to disk (installation-specific data will still be persisted
in root_cache_path). 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.cache_path value.
Size of this structure.
Request context initialization settings. Specify NULL or 0 to get the
recommended default values.
Specify whether signal handlers must be disabled on POSIX systems.
Specify an ID for an ICON resource that can be loaded from the main
executable and used when creating default Chrome windows such as DevTools
and Task Manager. If unspecified the default Chromium ICON (IDR_MAINFRAME
[101]) will be loaded from libcef.dll. Only supported with Chrome style on
Windows.
Specify an ID to enable Chrome policy management via Platform and OS-user
policies. On Windows, this is a registry key like
"SOFTWARE\\Policies\\Google\\Chrome". On MacOS, this is a bundle ID like
"com.google.Chrome". On Linux, this is an absolute directory path like
"/etc/opt/chrome/policies". Only supported with Chrome style. See
https://support.google.com/chrome/a/answer/9037717 for details.
Chrome Browser Cloud Management integration, when enabled via the
"enable-chrome-browser-cloud-management" command-line flag, will also use
the specified ID. See https://support.google.com/chrome/a/answer/9116814
for details.
Comma delimited list of schemes supported by the associated
CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0)
the default schemes ("http", "https", "ws" and "wss") will also be
supported. Not specifying a |cookieable_schemes_list| value and setting
|cookieable_schemes_exclude_defaults| to true (1) will disable all loading
and saving of cookies. These settings will only impact the global
CefRequestContext. Individual CefRequestContext instances can be
configured via the CefRequestContextSettings.cookieable_schemes_list and
CefRequestContextSettings.cookieable_schemes_exclude_defaults values.
Comma delimited ordered list of language codes without any whitespace that
will be used in the "Accept-Language" HTTP request header and
"navigator.language" JS attribute. Can be overridden for individual
CefRequestContext instances via the
CefRequestContextSettings.accept_language_list 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 windowed browser then the
default value of opaque white be used. If the alpha component is fully
transparent for a windowless (off-screen) browser then transparent
painting will be enabled.
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.
The fully qualified path for the locales directory. If this value is empty
the locales directory must be located in the module directory. If this
value is non-empty then it must be an absolute path. This value is ignored
on MacOS where pack files are always loaded from the app bundle Resources
directory. Also configurable using the "locales-dir-path" command-line
switch.
The fully qualified path for the resources directory. If this value is
empty the *.pak files must be located in the module directory on
Windows/Linux or the app bundle Resources directory on MacOS. If this
value is non-empty then it must be an absolute path. Also configurable
using the "resources-dir-path" 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 items prepended to each log line. If not set the default log items
will be used. Also configurable using the "log-items" command-line switch
with a value of "none" for no log items, or a comma-delimited list of
values "pid", "tid", "timestamp" or "tickcount" for custom log items.
The log severity. Only messages of this severity level or higher will be
logged. When set to DISABLE no messages will be written to the log file,
but FATAL messages will still be output to stderr. Also configurable using
the "log-severity" command-line switch with a value of "verbose", "info",
"warning", "error", "fatal" 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. On
MacOS a "~/Library/Logs/[app name]_debug.log" file will be written where
[app name] is the name of the main app executable. Also configurable using
the "log-file" command-line switch.
The locale string that will be passed to WebKit. If empty the default
locale of "en-US" will be used. This value is ignored on Linux where
locale is determined using environment variable parsing with the
precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also
configurable using the "lang" 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 "user-agent-product" command-line switch.
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.
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 (1). Session cookies are generally intended to be transient and
most Web browsers do not persist them. A |cache_path| value must also be
specified to enable this feature. Also configurable using the
"persist-session-cookies" command-line switch. Can be overridden for
individual CefRequestContext instances via the
CefRequestContextSettings.persist_session_cookies value.
The root directory for installation-specific data and the parent directory
for profile-specific data. All CefSettings.cache_path and
CefRequestContextSettings.cache_path values must have this parent
directory in common. If this value is empty and CefSettings.cache_path is
non-empty then it will default to the CefSettings.cache_path value. Any
non-empty value must be an absolute path. If both values are empty then
the default platform-specific directory will be used
("~/.config/cef_user_data" directory on Linux, "~/Library/Application
Support/CEF/User Data" directory on MacOS, "AppData\Local\CEF\User Data"
directory under the user profile directory on Windows). Use of the default
directory is not recommended in production applications (see below).
Multiple application instances writing to the same root_cache_path
directory could result in data corruption. A process singleton lock based
on the root_cache_path value is therefore used to protect against this.
This singleton behavior applies to all CEF-based applications using
version 120 or newer. You should customize root_cache_path for your
application and implement CefBrowserProcessHandler::
OnAlreadyRunningAppRelaunch, which will then be called on any app relaunch
with the same root_cache_path value.
Failure to set the root_cache_path value correctly may result in startup
crashes or other unexpected behaviors (for example, the sandbox blocking
read/write access to certain files).
The directory where data for the global browser cache will be stored on
disk. If this value is non-empty then it must be an absolute path that is
either equal to or a child directory of CefSettings.root_cache_path. If
this value is empty then browsers will be created in "incognito mode"
where in-memory caches are used for storage and no profile-specific data
is persisted to disk (installation-specific data will still be persisted
in root_cache_path). 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
CefRequestContextSettings.cache_path value. Any child directory value will
be ignored and the "default" profile (also a child directory) will be used
instead.
Set to true (1) 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 via the
CefApp::OnBeforeCommandLineProcessing() method.
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.
Set to true (1) to control browser process main (UI) thread message pump
scheduling via the CefBrowserProcessHandler::OnScheduleMessagePumpWork()
callback. This option is recommended for use in combination with the
CefDoMessageLoopWork() function in cases where the CEF message loop must
be integrated into an existing application message loop (see additional
comments and warnings on CefDoMessageLoopWork). Enabling this option is
not recommended for most users; leave this option disabled and use either
the CefRunMessageLoop() function or multi_threaded_message_loop if
possible.
Set to true (1) to have the browser process message loop run in a separate
thread. If false (0) then the CefDoMessageLoopWork() function must be
called from your application message loop. This option is only supported
on Windows and Linux.
The path to the main bundle on macOS. If this value is empty then it
defaults to the top-level app bundle. If this value is non-empty then it
must be an absolute path. Also configurable using the "main-bundle-path"
command-line switch.
The path to the CEF framework directory on macOS. If this value is empty
then the framework must exist at "Contents/Frameworks/Chromium Embedded
Framework.framework" in the top-level app bundle. If this value is
non-empty then it must be an absolute path. Also configurable using the
"framework-dir-path" command-line switch.
Set to true (1) to disable the sandbox for sub-processes. See
cef_sandbox_win.h for requirements to enable the sandbox on Windows. Also
configurable using the "no-sandbox" command-line switch.
Size of this structure.
Initialization settings. Specify NULL or 0 to get the recommended default
values. Many of these and other settings can also configured using command-
line switches.
Disable or disallow the setting.
Enable or allow the setting.
Use the default state for the setting.
Prepend the tickcount.
Prepend the timestamp.
Prepend the thread ID.
Prepend the process ID.
Prepend no items.
Prepend the default list of items.
Disable logging to file for all messages, and to stderr for messages with
severity less than FATAL.
FATAL logging.
ERROR logging.
WARNING logging.
INFO logging.
DEBUG logging.
Verbose logging.
Default logging (currently INFO logging).
The extra common info.
The pixel format of the texture.
Handle for the shared texture. The shared texture is instantiated
without a keyed mutex.
Size of this structure.
Structure containing shared texture information for the OnAcceleratedPaint
callback. Resources will be released to the underlying pool for reuse when
the callback returns from client code.
Optionally change the runtime style. Alloy style will always be used if
|windowless_rendering_enabled| is true. See cef_runtime_style_t
documentation for details.
Handle for the new browser window. Only used with windowed rendering.
Set to true (1) to enable the ability to issue BeginFrame requests from
the client application by calling CefBrowserHost::SendExternalBeginFrame.
Set to true (1) to enable shared textures for windowless rendering. Only
valid if windowless_rendering_enabled above is also set to true. Currently
only supported on Windows (D3D11).
Set to true (1) to create the browser using windowless (off-screen)
rendering. No window will be created for the browser and all rendering
will occur via the CefRenderHandler interface. The |parent_window| value
will be used to identify monitor info and to act as the parent window for
dialogs, context menus, etc. If |parent_window| is not provided then the
main screen monitor will be used and some functionality that requires a
parent window may not function correctly. In order to create windowless
browsers the CefSettings.windowless_rendering_enabled value must be set to
true. Transparent painting is enabled by default but can be disabled by
setting CefBrowserSettings.background_color to an opaque value.
Size of this structure.
Structure representing window information.
Structure representing CefExecuteProcess arguments.
Use Alloy style.
Use Chrome style.
Use the default style. See above documentation for exceptions.
Optional flag of capture_counter
Optional flag of source_size
Optional flag of region_capture_rect
Optional flag of capture_update_rect
The increamental counter of the frame.
May reflects where the frame's contents originate from if region
capture is used internally.
Updated area of frame, can be considered as the `dirty` area.
Full size of the source frame.
The region of the video frame that capturer would like to populate.
The visible area of the video frame.
The full dimensions of the video frame.
Timestamp of the frame in microseconds since capture start.
Size of this structure.
Structure containing shared texture common metadata.
For documentation on each field, please refer to
src/media/base/video_frame_metadata.h for actual details.
BGRA with 8 bits per pixel (32bits total).
RGBA with 8 bits per pixel (32bits total).
Structure representing insets.
Structure representing a size.
Structure representing a rectangle.
Structure representing a point.
Website setting which is used for UnusedSitePermissionsService to
store revoked notification permissions of disruptive sites.
Content settings for access to the Controlled Frame API.
Website setting to indicate whether the user has allowlisted suspicious
notifications for the origin.
Content settings for legacy cookie scope.
Checks whether cookies scope is handled according to origin-bound cookies
or legacy behavior.
Content settings for private network access in the context of the
Direct Sockets API.
Website setting to indicate whether user has opted in to allow web apps to
install other web apps.
Whether or not sites can request Hand Tracking data within WebXR Sessions.
Content Setting for the Storage Access Headers persistent origin trial
that allows origins to opt into the storage access header behavior. Should
be scoped to `REQUESTING_ORIGIN_AND_TOP_SCHEMEFUL_SITE_SCOPE` in order to
correspond to the design of persistent origin trials. See also:
https://github.com/cfredric/storage-access-headers
ALLOW: storage access request headers will be attached to cross-site
requests, and url requests will look for response headers from
origins to retry a request or load with storage access.
BLOCK (default): no effect.
Whether to use the higher-tier v8 optimizers for running JavaScript on the
page.
With this permission, when the application calls `getDisplayMedia()`, a
system audio track can be returned without showing the display media
selection picker. The application can explicitly specify
`systemAudio: 'exclude'` or `video: true` to still show the display media
selection picker if needed. Please note that the setting only works for
WebUI.
Content setting that controls tracking protection status per site.
BLOCK: Protections enabled. This is the default state.
ALLOW: Protections disabled.
Website setting which is used for UnusedSitePermissionsService to store
auto-revoked notification permissions from abusive sites.
Pointer Lock API allows a site to hide the cursor and have exclusive
access to mouse inputs.
Keyboard Lock API allows a site to capture keyboard inputs that would
otherwise be handled by the OS or the browser.
Content settings for access to the Direct Sockets API.
Whether an application can enumerate audio output device.
Content settings used to indicate that a web app is allowed to prompt the
user for the installation of sub apps.
Content setting used to indicate whether entering HTML Fullscreen
automatically (i.e. without transient activation) should be enabled.
Content settings for access to printers for the Web Printing API.
Content setting for access to smart card readers.
The "guard" content setting stores whether to allow sites to access the
Smart Card API.
Whether an application capturing another tab, may scroll and zoom
the captured tab.
Whether the FSA Persistent Permissions restore prompt is eligible to be
shown to the user, for a given origin.
Whether user has opted into keeping file/directory permissions persistent
between visits for a given origin. When enabled, permission metadata
stored under |FILE_SYSTEM_ACCESS_CHOOSER_DATA| can auto-grant incoming
permission request.
Content setting used to indicate whether entering picture-in-picture
automatically should be enabled.
Content Setting for a first-party origin trial that allows websites to
enable third-party cookie deprecation.
ALLOW (default): no effect (e.g. third-party cookies allowed, if not
blocked otherwise).
BLOCK: third-party cookies blocked, but 3PCD mitigations enabled.
Content Setting for 3PC accesses granted via top-level 3PC deprecation
trial. Similar to TPCD_TRIAL, but applicable at the page-level for the
lifetime of the page that served the token, rather than being specific to
a requesting-origin/top-level-site combination and persistent.
Content Setting for 3PC accesses granted via 3PC deprecation trial.
Content Setting for 3PC accesses granted by metadata delivered via the
component updater service. This type will only be used when
`net::features::kTpcdMetadataGrants` is enabled.
Content Setting for temporary 3PC accesses granted by user behavior
heuristics.
Stores per origin metadata for cookie controls.
Setting for enabling the `getAllScreensMedia` API. Spec link:
https://github.com/screen-share/capture-all-screens
Used to indicate whether HTTPS-First Mode is enabled on the hostname.
Content setting used to indicate whether third-party storage partitioning
should be enabled.
Content setting which is used to indicate whether anti-abuse functionality
should be enabled.
Website setting which stores whether the user has explicitly registered
a website as an identity-provider.
Setting to indicate whether user has opted in to allowing auto re-authn
via the FedCM API.
Similar to STORAGE_ACCESS, but applicable at the page-level rather than
being specific to a frame.
Website setting which is used for UnusedSitePermissionsService to
store revoked permissions of unused sites from unused site permissions
feature.
Website setting which stores whether the browser has observed the user
signing into an identity-provider based on observing the IdP-SignIn-Status
HTTP header.
Website setting to store permissions granted to access particular devices
in private network.
Website setting which is used for NotificationPermissionReviewService to
store origin blocklist from review notification permissions feature.
Website setting which stores the last reduced accept language negotiated
for a given origin, to be used on future visits to the origin.
Stores notification interactions per origin for the past 90 days.
Interactions per origin are pre-aggregated over seven-day windows: A
notification interaction or display is assigned to the last Monday
midnight in local time.
Setting to indicate whether browser should allow signing into a website
via the browser FedCM API.
Setting to indicate whether Chrome should request the desktop view of a
site instead of the mobile one.
Setting to indicate whether Chrome should automatically apply darkening to
web content.
Setting to indicate that there is an active federated sign-in session
between a specified relying party and a specified identity provider for
a specified account. When this is present it allows access to session
management capabilities between the sites. This setting is associated
with the relying party's origin.
Stores metadata related to form fill, such as e.g. whether user data was
autofilled on a specific website.
Content setting which stores user decisions to allow loading a site over
HTTP. Entries are added by hostname when a user bypasses the HTTPS-First
Mode interstitial warning when a site does not support HTTPS. Allowed
hosts are exact hostname matches -- subdomains of a host on the allowlist
must be separately allowlisted.
Whether to use the v8 optimized JIT for running JavaScript on the page.
Stores a grant that allows a relying party to send a request for identity
information to specified identity providers, potentially through any
anti-tracking measures that would otherwise prevent it. This setting is
associated with the relying party's origin.
Website setting to store permissions metadata granted to paths on the
local file system via the File System Access API.
|FILE_SYSTEM_WRITE_GUARD| is the corresponding "guard" setting. The stored
data represents valid permission only if
|FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION| is enabled via user opt-in.
Otherwise, they represent "recently granted but revoked permission", which
are used to restore the permission.
Controls access to the getDisplayMedia API.
Stores per-origin state of the most recently selected directory for the
use by the File System Access API.
Stores per-origin state for permission auto-revocation (for all permission
types).
Content setting which stores whether or not a site can access low-level
locally installed font data using the Local Fonts Access API.
Stores whether to allow insecure websites to make private network
requests.
See also: https://wicg.github.io/cors-rfc1918
Set through enterprise policies only.
Content setting for Screen Enumeration and Screen Detail functionality.
Permits access to detailed multi-screen information, like size and
position. Permits placing fullscreen and windowed content on specific
screens. See also: https://w3c.github.io/window-placement
Content setting which stores whether to allow a site to control camera
movements. It does not give access to camera.
Access to first party storage in a third-party context. Exceptions are
scoped to the combination of requesting/top-level origin, and are managed
through the Storage Access API. For the time being, this content setting
exists in parallel to third-party cookie rules stored in COOKIES.
Content setting which stores whether to allow site to open and read files
and directories selected through the File System Access API.
Used to store whether a site is allowed to request AR or VR sessions with
the WebXr Device API.
This content setting type is for caching safe browsing real time url
check's verdicts of each origin.
This is special-cased in the permissions layer to always allow, and as
such doesn't have associated prefs data.
Full access to the system clipboard (sanitized read without user gesture,
and unsanitized read and write with user gesture).
Website setting to store permissions granted to access particular
Bluetooth devices.
Used to store whether to allow a website to exchange data with NFC
devices.
Content settings which stores whether to allow sites to ask for permission
to save changes to an original file selected by the user through the
File System Access API.
Legacy SameSite cookie behavior. This disables SameSite=Lax-by-default,
SameSite=None requires Secure, and Schemeful Same-Site, forcing the
legacy behavior wherein 1) cookies that don't specify SameSite are treated
as SameSite=None, 2) SameSite=None cookies are not required to be Secure,
and 3) schemeful same-site is not active.
This will also be used to revert to legacy behavior when future changes
in cookie handling are introduced.
Wake Lock API, which has two lock types: screen and system locks.
Currently, screen locks do not need any additional permission, and system
locks are always denied while the right UI is worked out.
Content settings for access to HID devices. The "guard" content setting
stores whether to allow sites to ask for permission to access a device.
The permissions granted to access particular devices are stored in the
"chooser data" website setting.
Content setting which stores whether to allow sites to ask for permission
to do Bluetooth scanning.
Nothing is stored in this setting at present. Please refer to
PeriodicBackgroundSyncPermissionContext for details on how this permission
is ascertained.
This content setting is not registered because it does not require access
to any existing providers.
Content settings for access to serial ports. The "guard" content setting
stores whether to allow sites to ask for permission to access a port. The
permissions granted to access particular ports are stored in the "chooser
data" website setting.
Used to store whether to allow a website to detect user active/idle state.
Website setting which stores the amount of times the user has dismissed
intent picker UI without explicitly choosing an option.
Nothing is stored in this setting at present. Please refer to
BackgroundFetchPermissionContext for details on how this permission
is ascertained.
Content setting which stores whether to allow sites to ask for permission
to access USB devices. If this is allowed specific device permissions are
stored under USB_CHOOSER_DATA.
Used to store whether to allow a website to install a payment handler.
Content setting which stores whether or not the user has granted the site
permission to respond to accessibility events, which can be used to
provide a custom accessibility experience. Requires explicit user consent
because some users may not want sites to know they're using assistive
technology. Deprecated in M131.
Generic Sensor API covering ambient-light-sensor, accelerometer, gyroscope
and magnetometer are all mapped to a single content_settings_type.
Setting for the Generic Sensor API covering ambient-light-sensor,
accelerometer, gyroscope and magnetometer. These are all mapped to a
single ContentSettingsType.
Website setting which stores the list of client hints that the origin
requested the browser to remember. The browser is expected to send all
client hints in the HTTP request headers for every resource requested
from that origin.
Content setting which stores whether or not the site can play audible
sound. This will not block playback but instead the user will not hear it.
Website setting which stores engagement data for media related to a
specific origin.
This content setting type is for caching password protection service's
verdicts of each origin.
MIDI stands for Musical Instrument Digital Interface. It is a standard
that allows electronic musical instruments, computers, and other devices
to communicate with each other.
Website setting which stores metadata for the subresource filter to aid in
decisions for whether or not to show the UI.
Advanced device-specific functions on MIDI devices. MIDI-SysEx
communications can be used for changing the MIDI device's persistent state
such as firmware.
This setting governs both popups and unwanted redirects like tab-unders
and framebusting.
provided context. However, it may be overridden by other settings. This
enum should NOT be read directly to determine whether cookies are enabled;
the client should instead rely on the CookieSettings API.
Returns the CEF API version that was configured by the first call to
cef_api_hash().
API was added in the specified version.
API was removed in the specified version.
API exists only in the specified version range.
Configures the CEF API version and returns API hashes for the libcef
library. The returned string is owned by the library and should not be
freed. The |version| parameter should be CEF_API_VERSION and any changes to
this value will be ignored after the first call to this method. The |entry|
parameter describes which hash value will be returned:
0 - CEF_API_HASH_PLATFORM
1 - CEF_API_HASH_UNIVERSAL (deprecated, same as CEF_API_HASH_PLATFORM)
2 - CEF_COMMIT_HASH (from cef_version.h)
Creates a copy of an existing string list.
Free the string list.
Clear the string list.
Append a new value at the end of the string list.
Retrieve the value at the specified zero-based string list index. Returns
true (1) if the value was successfully retrieved.
Return the number of elements in the string list.
Allocate a new string map.
CEF string maps are a set of key/value string pairs.
Traits implementation for utf16 character strings.
Traits implementation for utf8 character strings.
Traits implementation for wide character strings.
These functions convert utf16 string case using the current ICU locale. This
may change the length of the string in some cases.
These functions free the string structure allocated by the associated
alloc function. Any string contents will first be cleared.
These functions allocate a new string structure. They must be freed by
calling the associated free function.
It is sometimes necessary for the system to allocate string structures with
the expectation that the user will free them. The userfree types act as a
hint that the user is responsible for freeing the structure.
These functions convert an ASCII string, typically a hardcoded constant, to
a Wide/UTF16 string. Use instead of the UTF8 conversion routines if you know
the string is ASCII.
These functions convert between UTF-8, -16, and -32 strings. They are
potentially slow so unnecessary conversions should be avoided. The best
possible result will always be written to |output| with the boolean return
value indicating whether the conversion is 100% valid.
These functions compare two string values with the same results as strcmp().
Convenience macros for copying values.
These functions clear string values. The structure itself is not freed.
These functions set string values. If |copy| is true (1) the value will be
copied instead of referenced. It is up to the user to properly manage
the lifespan of references.
\file
CEF provides functions for converting between UTF-8, -16 and -32 strings.
CEF string types are safe for reading from multiple threads but not for
modification. It is the user's responsibility to provide synchronization if
modifying CEF strings from multiple threads.
CEF string type definitions. Whomever allocates |str| is responsible for
providing an appropriate |dtor| implementation that will free the string in
the same memory space. When reusing an existing string structure make sure
to call |dtor| for the old value before assigning new |str| and |dtor|
values. Static strings will have a NULL |dtor| value. Using the below
functions if you want this managed for you.
Return the delta between this object and |other| in milliseconds.
Set this object to now.
Converts to/from a double which is the number of seconds since epoch
(Jan 1, 1970). Webkit uses this format to represent time. A value of 0
means "not initialized".
Converts to/from time_t.
Class representing a time.
Represents a wall clock time in UTC. Values are not guaranteed to be
monotonically non-decreasing and are subject to large amounts of skew.
Time is stored internally as microseconds since the Windows epoch (1601).
This is equivalent of Chromium `base::Time` (see base/time/time.h).
Converts cef_basetime_t to cef_time_t. Returns true (1) on success and
false (0) on failure.
Converts cef_time_t to cef_basetime_t. Returns true (1) on success and
false (0) on failure.
Retrieve the delta in milliseconds between two time values. Returns true (1)
on success and false (0) on failure.
Retrieve the current system time.
Retrieve the current system time. Returns true (1) on success and false (0)
on failure.
Converts cef_time_t to/from a double which is the number of seconds since
epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0
means "not initialized". Returns true (1) on success and false (0) on
failure.
Converts cef_time_t to/from time_t. Returns true (1) on success and false
(0) on failure.
Milliseconds within the current second (0-999)
Second within the current minute (0-59 plus leap seconds which may take
it up to 60).
Minute within the current hour (0-59)
Hour within the current day (0-23)
1-based day of month (1-31)
0-based day of week (0 = Sunday, etc.)
1-based month (values 1 = January, etc.)
Four or five digit year "2007" (1601 to 30827 on Windows, 1970 to 2038 on
32-bit POSIX)
Time information. Values should always be in UTC.
ThreadChecker is a helper class used to help verify that some methods of a
class are called from the same thread. It provides identical functionality
to base::NonThreadSafe, but it is meant to be held as a member variable,
rather than inherited from base::NonThreadSafe.
While inheriting from base::NonThreadSafe may give a clear indication about
the thread-safety of a class, it may also lead to violations of the style
guide with regard to multiple inheritance. The choice between having a
ThreadChecker member and inheriting from base::NonThreadSafe should be based
on whether:
- Derived classes need to know the thread they belong to, as opposed to
having that functionality fully encapsulated in the base class.
- Derived classes should be able to reassign the base class to another
thread, via DetachFromThread.
If neither of these are true, then having a ThreadChecker member and calling
CalledOnValidThread is the preferable solution.
Example:
class MyClass {
public:
void Foo() {
DCHECK(thread_checker_.CalledOnValidThread());
... (do stuff) ...
}
private:
ThreadChecker thread_checker_;
}
In Release mode, CalledOnValidThread will always return true.
Do nothing implementation, for use in release mode.
Note: You should almost always use the ThreadChecker class to get the
right version for your build configuration.
AutoUnlock is a helper that will Release() the |lock| argument in the
constructor, and re-Acquire() it in the destructor.
A helper class that acquires the given Lock while the AutoLock is in scope.
A convenient wrapper for an OS specific critical section. The only real
intelligence in this class is in debug mode for the support for the
AssertAcquired() method.
Gets the current thread reference, which can be used to check if
we're on the right thread quickly.
Gets the current thread id, which may be useful for logging purposes.
Used for thread checking and debugging.
Meant to be as fast as possible.
These are produced by PlatformThread::CurrentRef(), and used to later
check if we are on the same thread or not by using ==. These are safe
to copy between threads, but can't be copied to another process as they
have no meaning there. Also, the internal identifier can be re-used
after a thread dies, so a PlatformThreadRef cannot be reliably used
to distinguish a new thread from an old, dead thread.
Used for logging. Always an integer value.
Returns the current platform thread handle.
Returns the current platform thread ID.
Add a log message. See the LogSeverity defines for supported |severity|
values.
Gets the current vlog level for the given file (usually taken from
__FILE__). Note that |N| is the size *with* the null terminator.
Gets the current log level.
Returns the current reference count (with no barriers). This is subtle,
and should be used only for debugging.
Return whether the reference count is zero. With conventional object
referencing counting, the object will be destroyed, so the reference count
should never be zero. Hence this is generally used for a debug check.
Return whether the reference count is one. If the reference count is used
in the conventional way, a refrerence count of 1 implies that the current
thread owns the reference and no other thread shares it. This call
performs the test for a reference count of one, and performs the memory
barrier needed for the owning thread to act on the object, knowing that it
has exclusive access to the object.
Decrement a reference count, and return whether the result is non-zero.
Insert barriers to ensure that state written before the reference count
became zero will be visible to a thread that has just made the count zero.
Increment a reference count by "increment", which must exceed 0.
Returns the previous value of the count.
Increment a reference count.
Returns the previous value of the count.
\file
This file adds defines about the platform we're currently building on.
Operating System:
OS_AIX / OS_ANDROID / OS_ASMJS / OS_FREEBSD / OS_FUCHSIA / OS_IOS /
OS_LINUX / OS_MAC / OS_NACL (SFI or NONSFI) / OS_NETBSD / OS_OPENBSD /
OS_QNX / OS_SOLARIS / OS_WIN
Operating System family:
OS_APPLE: IOS or MAC
OS_BSD: FREEBSD or NETBSD or OPENBSD
OS_POSIX: AIX or ANDROID or ASMJS or CHROMEOS or FREEBSD or IOS or LINUX
or MAC or NACL or NETBSD or OPENBSD or QNX or SOLARIS
/!\ Note: OS_CHROMEOS is set by the build system, not this file
Compiler:
COMPILER_MSVC / COMPILER_GCC
Processor:
ARCH_CPU_ARM64 / ARCH_CPU_ARMEL / ARCH_CPU_MIPS / ARCH_CPU_MIPS64 /
ARCH_CPU_MIPS64EL / ARCH_CPU_MIPSEL / ARCH_CPU_PPC64 / ARCH_CPU_S390 /
ARCH_CPU_S390X / ARCH_CPU_X86 / ARCH_CPU_X86_64
Processor family:
ARCH_CPU_ARM_FAMILY: ARMEL or ARM64
ARCH_CPU_MIPS_FAMILY: MIPS64EL or MIPSEL or MIPS64 or MIPS
ARCH_CPU_PPC64_FAMILY: PPC64
ARCH_CPU_S390_FAMILY: S390 or S390X
ARCH_CPU_X86_FAMILY: X86 or X86_64
Processor features:
ARCH_CPU_31_BITS / ARCH_CPU_32_BITS / ARCH_CPU_64_BITS
ARCH_CPU_BIG_ENDIAN / ARCH_CPU_LITTLE_ENDIAN
Set the resolved URL after redirects or changed as a result of HSTS.
Set the resolved URL after redirects or changed as a result of HSTS.
Set the resolved URL after redirects or changed as a result of HSTS.
Get the resolved URL after redirects or changed as a result of HSTS.
Get the resolved URL after redirects or changed as a result of HSTS.
Get the resolved URL after redirects or changed as a result of HSTS.
Set all response header fields.
Set all response header fields.
Set all response header fields.
Get all response header fields.
Get all response header fields.
Get all response header fields.
Set the header |name| to |value|. If |overwrite| is true any existing
values will be replaced with the new value. If |overwrite| is false any
existing values will not be overwritten.
Set the header |name| to |value|. If |overwrite| is true any existing
values will be replaced with the new value. If |overwrite| is false any
existing values will not be overwritten.
Set the header |name| to |value|. If |overwrite| is true any existing
values will be replaced with the new value. If |overwrite| is false any
existing values will not be overwritten.
Get the value for the specified response header field.
Get the value for the specified response header field.
Get the value for the specified response header field.
Set the response charset.
Set the response charset.
Set the response charset.
Get the response charset.
Get the response charset.
Get the response charset.
Set the response mime type.
Set the response mime type.
Set the response mime type.
Get the response mime type.
Get the response mime type.
Get the response mime type.
Set the response status text.
Set the response status text.
Set the response status text.
Get the response status text.
Get the response status text.
Get the response status text.
Set the response status code.
Set the response status code.
Set the response status code.
Get the response status code.
Get the response status code.
Get the response status code.
Set the response error code. This can be used by custom scheme handlers
to return errors during initial request processing.
Set the response error code. This can be used by custom scheme handlers
to return errors during initial request processing.
Set the response error code. This can be used by custom scheme handlers
to return errors during initial request processing.
Get the response error code. Returns ERR_NONE if there was no error.
Get the response error code. Returns ERR_NONE if there was no error.
Get the response error code. Returns ERR_NONE if there was no error.
Returns true if this object is read-only.
Returns true if this object is read-only.
Returns true if this object is read-only.
Create a new CefResponse object.
Create a new CefResponse object.
Create a new CefResponse object.
Class used to represent a web response. The methods of this class may be
called on any thread.
Class used to represent a web response. The methods of this class may be
called on any thread.
Class used to represent a web response. The methods of this class may be
called on any thread.
Returns the mime type.
Returns the mime type.
Returns the content disposition.
Returns the content disposition.
Returns the suggested file name.
Returns the suggested file name.
Returns the original URL before any redirections.
Returns the original URL before any redirections.
Returns the URL.
Returns the URL.
Returns the unique identifier for this download.
Returns the unique identifier for this download.
Returns the full path to the downloaded or downloading file.
Returns the full path to the downloaded or downloading file.
Returns the time that the download ended.
Returns the time that the download ended.
Returns the time that the download started.
Returns the time that the download started.
Returns the number of received bytes.
Returns the number of received bytes.
Returns the total number of bytes.
Returns the total number of bytes.
Returns the rough percent complete or -1 if the receive total size is
unknown.
Returns the rough percent complete or -1 if the receive total size is
unknown.
Returns a simple speed estimate in bytes/s.
Returns a simple speed estimate in bytes/s.
Returns the most recent interrupt reason.
Returns the most recent interrupt reason.
Returns true if the download has been interrupted.
Returns true if the download has been interrupted.
Returns true if the download has been canceled.
Returns true if the download has been canceled.
Returns true if the download is complete.
Returns true if the download is complete.
Returns true if the download is in progress.
Returns true if the download is in progress.
Returns true if this object is valid. Do not call any other methods if
this function returns false.
Returns true if this object is valid. Do not call any other methods if
this function returns false.
Class used to represent a download item.
Class used to represent a download item.