This creates a base class for a thing to help you implement the function pointers.
Mode for how the Bounds property is interpreted in relation to the RasterizationScale property.
Specifies the browser process exit type used in the ICoreWebView2BrowserProcessExitedEventArgs interface.
Specifies the datatype for the ICoreWebView2Profile2::ClearBrowsingData method.
Specifies the image format for the ICoreWebView2::CapturePreview method.
Specifies the client certificate kind.
Specifies the menu item kind for the ICoreWebView2ContextMenuItem::get_Kind method
Indicates the kind of context for which the context menu was created for the ICoreWebView2ContextMenuTarget::get_Kind method. This enum will always represent the active element that caused the context menu request. If there is a selection with multiple images, audio and text, for example, the element that the end user right clicks on within this selection will be the option represented by this enum.
Kind of cookie SameSite status used in the ICoreWebView2Cookie interface. These fields match those as specified in https://developer.mozilla.org/docs/Web/HTTP/Cookies#. Learn more about SameSite cookies here: https://tools.ietf.org/html/draft-west-first-party-cookies-07
The default download dialog can be aligned to any of the WebView corners by setting the DefaultDownloadDialogCornerAlignment property. The default position is top-right corner.
Reason why a download was interrupted.
State of the download operation.
Specifies the image format to use for favicon.
Indicates the frame type used in the ICoreWebView2FrameInfo interface.
Kind of cross origin resource access allowed for host resources during download. Note that other normal access checks like same origin DOM access check and [Content Security Policy](https://developer.mozilla.org/docs/Web/HTTP/CSP) still apply. The following table illustrates the host resource cross origin access according to access context and COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND.
Specifies the key event type that triggered an AcceleratorKeyPressed event.
Specifies memory usage target level of WebView.
Mouse event type used by SendMouseInput to convey the type of mouse event being sent to WebView. The values of this enum align with the matching WM_* window messages.
Mouse event virtual keys associated with a COREWEBVIEW2_MOUSE_EVENT_KIND for SendMouseInput. These values can be combined into a bit flag if more than one virtual key is pressed for the event. The values of this enum align with the matching MK_* mouse keys.
Specifies the reason for moving focus.
Specifies the navigation kind of each navigation.
Specifies the PDF toolbar item types used for the ICoreWebView2Settings::put_HiddenPdfToolbarItems method.
Indicates the type of a permission request.
Specifies the response to a permission request.
Pointer event type used by SendPointerInput to convey the type of pointer event being sent to WebView. The values of this enum align with the matching WM_POINTER* window messages.
An enum to represent the options for WebView2 color scheme: auto, light, or dark.
Specifies the collation for a print.
Specifies the color mode for a print.
Specifies the print dialog kind.
Specifies the duplex option for a print.
Specifies the media size for a print.
The orientation for printing, used by the Orientation property on ICoreWebView2PrintSettings.
Indicates the status for printing.
Specifies the process failure type used in the ICoreWebView2ProcessFailedEventArgs interface. The values in this enum make reference to the process kinds in the Chromium architecture. For more information about what these processes are and what they do, see Browser Architecture - Inside look at modern web browser.
Specifies the process failure reason used in the ICoreWebView2ProcessFailedEventArgs interface. For process failures where a process has exited, it indicates the type of issue that produced the process exit.
Indicates the process type used in the ICoreWebView2ProcessInfo interface.
Specifies the JavaScript dialog type used in the ICoreWebView2ScriptDialogOpeningEventHandler interface.
Specifies the action type when server certificate error is detected to be used in the ICoreWebView2ServerCertificateErrorDetectedEventArgs interface.
Specifies the desired access from script to CoreWebView2SharedBuffer.
Tracking prevention levels.
Indicates the error status values for web navigations.
Specifies the web resource request contexts.
Describes how to interpret the alpha component of a pixel.
Specifies where along the axis the CefBoxLayout child views should be laid out. Should be kept in sync with Chromium's views::LayoutAlignment type.
Specifies the button display state.
Enumerates the various representations of the ordering of audio channels. Must be kept synchronized with media::ChannelLayout from Chromium. See media\base\channel_layout.h
Chrome page action icon types. Should be kept in sync with Chromium's PageActionIconType type.
Chrome toolbar button types. Should be kept in sync with CEF's internal ToolbarButtonType type.
Chrome toolbar types.
Print job color mode values.
Describes how to interpret the components of a pixel.
Specifies the color variants supported by CefRequestContext::SetChromeThemeColor.
Windows COM initialization mode. Specifies how COM will be initialized for a new thread.
Composition underline style.
Supported content setting types. Some types are platform-specific or only supported with the Chrome runtime. Should be kept in sync with Chromium's ContentSettingsType type.
Supported content setting values. Should be kept in sync with Chromium's ContentSetting type.
Supported context menu edit state bit flags. These constants match their equivalents in Chromium's ContextMenuDataEditFlags and should not be renumbered.
Supported context menu media state bit flags. These constants match their equivalents in Chromium's ContextMenuData::MediaFlags and should not be renumbered.
Supported context menu media types. These constants match their equivalents in Chromium's ContextMenuDataMediaType and should not be renumbered.
Supported context menu type flags.
Cookie priority values.
Cookie same site values.
Cursor type values.
Docking modes supported by CefWindow::AddOverlay.
DOM document types.
DOM event category flags.
DOM event processing phases.
DOM form control types. Should be kept in sync with Chromium's blink::mojom::FormControlType type.
DOM node types.
Download interrupt reasons. Should be kept in sync with Chromium's download::DownloadInterruptReason type.
"Verb" of a drag-and-drop operation as negotiated between the source and destination. These constants match their equivalents in WebCore's DragActions.h and should not be renumbered.
Print job duplex mode values.
Supported error code values. For the complete list of error values see "include/base/internal/cef_net_error_list.h".
Supported event bit flags.
Supported file dialog modes.
Focus sources.
Specifies the gesture commands.
Specifies the horizontal text alignment mode.
Supported JavaScript dialog types.
Options that can be passed to CefParseJSON.
Options that can be passed to CefWriteJSON.
Key event types.
Log items prepended to each log line.
Log severity levels.
Media access permissions used by OnRequestMediaAccessPermission.
Connection state for a MediaRoute object.
Result codes for CefMediaRouter::CreateRoute. Should be kept in sync with Chromium's media_router::mojom::RouteRequestResultCode type.
Icon types for a MediaSink object. Should be kept in sync with Chromium's
Specifies how a menu will be anchored for non-RTL languages. The opposite position will be used for RTL languages.
Supported color types for menu items.
Supported menu IDs. Non-English translations can be provided for the IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString().
Supported menu item types.
Message loop types. Indicates the set of asynchronous events that a message loop can process.
Mouse button types.
Navigation types.
Paint element types.
Path key values.
Margin type for PDF printing.
Permission request results.
Permission types used with OnShowPermissionPrompt. Some types are platform-specific or only supported with the Chrome runtime. Should be kept in sync with Chromium's permissions::RequestType type.
The device type that caused the event.
Post data elements may represent either bytes or files.
Preferences type passed to CefBrowserProcessHandler::OnRegisterCustomPreferences.
Existing process IDs.
Supported quick menu state bit flags.
Policy for how the Referrer HTTP header value will be sent during navigation. If the --no-referrers command-line flag is specified then the policy value will be ignored and the Referrer value will never be sent. Must be kept synchronized with net::URLRequest::ReferrerPolicy from Chromium.
Resource type for a request. These constants match their equivalents in Chromium's ResourceType and should not be renumbered.
Return values for CefResponseFilter::Filter().
Return value types.
Supported UI scale factors for the platform. SCALE_FACTOR_NONE is used for density independent resources such as string, html/js files or an image that can be used for any scale factors (such as wallpapers).
Configuration options for registering a custom scheme. These values are used when calling AddCustomScheme.
Show states supported by CefWindowDelegate::GetInitialShowState.
Supported SSL content status flags. See content/public/common/ssl_status.h for more information.
Supported SSL version values. See net/ssl/ssl_connection_status_flags.h for more information.
Represents the state of a setting.
Storage types.
Process termination status values.
Certificate types supported by CefTestServer::CreateAndStart. The matching certificate file must exist in the "net/data/ssl/certificates" directory. See CefSetDataDirectoryForTests() for related configuration.
Represents commands available to TextField.
Input mode of a virtual keyboard. These constants match their equivalents in Chromium's text_input_mode.h and should not be renumbered. See https://html.spec.whatwg.org/#input-modalities:-the-inputmode-attribute
Text style types. Should be kepy in sync with gfx::TextStyle.
Existing thread IDs.
Thread priority values listed in increasing order of importance.
Touch points states types.
Values indicating what state of the touch handle is set.
Transition type for a request. Made up of one source value and 0 or more qualifiers.
URI unescape rules passed to CefURIDecode().
Flags used to customize the behavior of CefURLRequest.
Flags that represent CefURLRequest status.
V8 property attribute values.
Supported value types.
Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default. All other types must be translated to UTF8 before being passed to the parser. If a BOM is detected and the correct decoder is available then that decoder will be used automatically.
XML node types.
Specifies the zoom commands supported by CefBrowserHost::Zoom.
This method is for anyone want to compare version correctly to determine which version is newer, older or same. Use it to determine whether to use webview2 or certain feature based upon version. Sets the value of result to -1, 0 or 1 if version1 is less than, equal or greater than version2 respectively. Returns E_INVALIDARG if it fails to parse any of the version strings or any input parameter is null. Directly use the versionInfo obtained from GetAvailableCoreWebView2BrowserVersionString with input, channel information is ignored.
Creates an evergreen WebView2 Environment using the installed WebView2 Runtime version. This is equivalent to running CreateCoreWebView2EnvironmentWithOptions with nullptr for browserExecutableFolder, userDataFolder, additionalBrowserArguments. For more information, navigate to CreateCoreWebView2EnvironmentWithOptions.
DLL export to create a WebView2 environment with a custom version of WebView2 Runtime, user data folder, and with or without additional options.
Get the browser version info including channel name if it is not the WebView2 Runtime. Channel names are Beta, Dev, and Canary. If an override exists for the browserExecutableFolder or the channel preference, the override is used. If an override is not specified, then the parameter value passed to GetAvailableCoreWebView2BrowserVersionString is used. Returns HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) if it fails to find an installed WebView2 runtime or non-stable Microsoft Edge installation.
Add an entry to the cross-origin access whitelist.
Decodes the base64 encoded string |data|. The returned value will be NULL if the decoding fails.
Encodes |data| as a base64 string.
pending, CefBeginTracing will fail and return false (0).
Creates a new object that is not owned by any other object. The specified |data| will be copied.
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 NULL the global request context will be used. This function 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 cef_render_process_handler_t::on_browser_created() in the render process.
Create a new browser using the window parameters specified by |windowInfo|. If |request_context| is NULL the global request context will be used. This function 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
Remove all entries from the cross-origin access whitelist. Returns false (0) if the whitelist cannot be accessed.
Clear all scheme handler factories registered with the global request context. Returns false (0) on error. This function may be called on any thread in the browser process. Using this function is equivalent to calling
Create a new cef_command_line_t instance.
Returns the singleton global cef_command_line_t object. The returned object will be read-only.
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 function is equivalent to calling cef_request_context_t::cef_request_context_get_global_context()- >GetDefaultCookieManager().
Crash reporting is configured using an INI-style config file named "crash_reporter.cfg". On Windows and Linux this file must be placed next to the main application executable. On macOS this file must be placed in the top-level app bundle Resources directory (e.g. "<appname>.app/Contents/Resources"). File contents are as follows:
Creates a new context object that shares storage with |other| and uses an optional |handler|.
Creates a directory and all parent directories if they don't already exist. Returns true (1) on successful creation or if the directory already exists. The directory is only readable by the current user. Calling this function on the browser process UI or IO threads is not allowed.
Creates a new directory. On Windows if |prefix| is provided the new directory name is in the format of "prefixyyyy". Returns true (1) on success and sets |new_temp_path| to the full path of the directory that was created. The directory is only readable by the current user. Calling this function on the browser process UI or IO threads is not allowed.
Creates a directory within another directory. Extra characters will be appended to |prefix| to ensure that the new directory does not have the same name as an existing directory. Returns true (1) on success and sets |new_dir| to the full path of the directory that was created. The directory is only readable by the current user. Calling this function on the browser process UI or IO threads is not allowed.
Creates a URL from the specified |parts|, which must contain a non-NULL spec or a non-NULL host and path (at a minimum), but not both. Returns false (0) if |parts| isn't initialized as described.
Returns true (1) if called on the specified thread. Equivalent to using
Deletes the given path whether it's a file or a directory. If |path| is a directory all contents will be deleted. If |recursive| is true (1) any sub- directories and their contents will also be deleted (equivalent to executing "rm -rf", so use with caution). On POSIX environments if |path| is a symbolic link then only the symlink will be deleted. Returns true (1) on successful deletion or if |path| does not exist. Calling this function on the browser process UI or IO threads is not allowed.
Creates a new object that is not owned by any other object.
Returns true (1) if the given path exists and is a directory. Calling this function on the browser process UI or IO threads is not allowed.
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 cef_run_message_loop() 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
Create a new cef_drag_data_t object.
Stop tracing events on all processes.
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 NULL. The |windows_sandbox_info| parameter is only used on Windows and may be NULL (see cef_sandbox_win.h for details).
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.
This function can optionally be called on the main application thread after CefInitialize to retrieve the initialization exit code. When CefInitialize returns true (1) 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).
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 NULL string if unknown.
Retrieve the path associated with the specified |key|. Returns true (1) on success. Can be called on any thread in the browser process.
Get the temporary directory provided by the system.
Create a new cef_image_t. It will initially be NULL. Use the Add*() functions to add representations at different scale factors.
This function should be called on the main application thread to initialize the CEF browser process. The |application| parameter may be NULL. Returns true (1) if initialization succeeds. Returns false (0) if initialization fails or if early exit is desired (for example, due to process singleton relaunch behavior). If this function returns false (0) 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).
Returns true (1) if the application text direction is right-to-left.
Launches the process specified via |command_line|. Returns true (1) upon success. Must be called on the browser process TID_PROCESS_LAUNCHER thread.
Creates a new object that is not owned by any other object.
Loads the existing "Certificate Revocation Lists" file that is managed by Google Chrome. This file can generally be found in Chrome's User Data directory (e.g. "C:\Users\User\AppData\Local\Google\Chrome\User Data\" on Windows) and is updated periodically by Chrome's component updater service. Must be called in the browser process after the context has been initialized. See https://dev.chromium.org/Home/chromium-security/crlsets for background.
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 cef_request_context_t::cef_request_context_get_global_context()- >get_media_router().
Create a new MenuModel with the specified |delegate|.
Returns the current system trace time or, if none is defined, the current high-res time. Can be used by clients to synchronize with the time information in trace events.
Parses the specified |json_string| and returns a dictionary or list representation. If JSON parsing fails this function returns NULL.
Parses the specified UTF8-encoded |json| buffer of size |json_size| and returns a dictionary or list representation. If JSON parsing fails this function returns NULL.
Parses the specified |json_string| and returns a dictionary or list representation. If JSON parsing fails this function returns NULL and populates |error_msg_out| with a formatted error message.
Parse the specified |url| into its component parts. Returns false (0) if the URL is NULL or invalid.
Create a new cef_post_data_t object.
Create a new cef_post_data_element_t object.
Post a task for delayed execution on the specified thread. Equivalent to using cef_task_runner_t::GetForThread(threadId)->PostDelayedTask(task, delay_ms).
Post a task for execution on the specified thread. Equivalent to using
Returns the global preference manager object.
Create a new cef_print_settings_t object.
Create a new cef_process_message_t object with the specified name.
Quit the CEF message loop that was started by calling cef_run_message_loop(). This function should only be called on the main application thread and only if cef_run_message_loop() was used.
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.
Register a scheme handler factory with the global request context. An NULL |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
Remove an entry from the cross-origin access whitelist. Returns false (0) if |source_origin| is invalid or the whitelist cannot be accessed.
Creates a new context object with the specified |settings| and optional |handler|.
Returns the global context object.
Create a new cef_request_t object.
Combines specified |base_url| and |relative_url| into |resolved_url|. Returns false (0) if one of the URLs is NULL or invalid.
Returns the global resource bundle instance.
Create a new cef_response_t object.
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 cef_settings_t.multi_threaded_message_loop value of false (0). This function will block until a quit message is received by the system.
Create a new server that binds to |address| and |port|. |address| must be a valid IPv4 or IPv6 address (e.g. 127.0.0.1 or ::1) and |port| must be a port number outside of the reserved range (e.g. between 1025 and 65535 on most platforms). |backlog| is the maximum number of pending connections. A new thread will be created for each CreateServer call (the "dedicated server thread"). It is therefore recommended to use a different cef_server_handler_t instance for each CreateServer call to avoid thread safety issues in the cef_server_handler_t implementation. The
Sets or clears a specific key-value pair from the crash metadata.
Creates a new cef_shared_process_message_builder_t with the specified |name| and shared memory region of specified |byte_size|.
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.
Create a new cef_stream_reader_t object from data.
Create a new cef_stream_reader_t object from a file.
Create a new cef_stream_reader_t object from a custom handler.
Create a new cef_stream_writer_t object for a file.
Create a new cef_stream_writer_t object for a custom handler.
Returns the task runner for the current thread. Only CEF threads will have task runners. An NULL reference will be returned if this function is called on an invalid thread.
Returns the task runner for the specified CEF thread.
Create and start a new thread. This function does not block waiting for the thread to run initialization. |display_name| is the name that will be used to identify the thread. |priority| is the thread execution priority. |message_loop_type| indicates the set of asynchronous events that the thread can process. If |stoppable| is true (1) the thread will stopped and joined on destruction or when stop() is called; otherwise, the thread cannot be stopped and will be leaked on shutdown. On Windows the |com_init_mode| value specifies how COM will be initialized for the thread. If |com_init_mode| is set to COM_INIT_MODE_STA then |message_loop_type| must be set to ML_TYPE_UI.
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 (1) 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 (1) spaces will change to "+". The result is basically the same as encodeURIComponent in Javacript.
Create a new URL request that is not associated with a specific browser or frame. Use cef_frame_t::CreateURLRequest instead if you want the request to have this association, in which case it may be handled differently (see documentation on that function). A request created with this function 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.
Returns the current (top) context object in the V8 context stack.
Returns the entered (bottom) context object in the V8 context stack.
Returns true (1) if V8 is currently inside a context.
Returns the stack trace for the currently active context. |frame_limit| is the maximum number of frames that will be captured.
Create a new cef_v8value_t object of type array with the specified |length|. If |length| is negative the returned array will have length 0. This function should only be called from within the scope of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling enter() and exit() on a stored cef_v8context_t reference.
Create a new cef_v8value_t 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 cef_v8array_buffer_release_callback_t::ReleaseBuffer. This function should only be called from within the scope of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling enter() and exit() on a stored cef_v8context_t reference.
Create a new cef_v8value_t object of type bool.
Create a new cef_v8value_t object of type Date. This function should only be called from within the scope of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling enter() and exit() on a stored cef_v8context_t reference.
Create a new cef_v8value_t object of type double.
Create a new cef_v8value_t object of type function. This function should only be called from within the scope of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling enter() and exit() on a stored cef_v8context_t reference.
Create a new cef_v8value_t object of type int.
Create a new cef_v8value_t object of type null.
Create a new cef_v8value_t object of type object with optional accessor and/or interceptor. This function should only be called from within the scope of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling enter() and exit() on a stored cef_v8context_t reference.
Create a new cef_v8value_t object of type Promise. This function should only be called from within the scope of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling enter() and exit() on a stored cef_v8context_t reference.
Create a new cef_v8value_t object of type string.
Create a new cef_v8value_t object of type unsigned int.
Create a new cef_v8value_t object of type undefined.
Creates a new object.
Create a new waitable event. If |automatic_reset| is true (1) then the event state is automatically reset to un-signaled after a single waiting thread has been released; otherwise, the state remains signaled until reset() is called manually. If |initially_signaled| is true (1) then the event will start in the signaled state.
Generates a JSON string from the specified root |node| which should be a dictionary or list value. Returns an NULL string on failure. This function requires exclusive access to |node| including any underlying data.
Create a new cef_xml_reader_t object. The returned object's functions can only be called from the thread that created the object.
Writes the contents of |src_dir| into a zip archive at |dest_file|. If |include_hidden_files| is true (1) files starting with "." will be included. Returns true (1) on success. Calling this function on the browser process UI or IO threads is not allowed.
Create a new cef_zip_reader_t object. The returned object's functions can only be called from the thread that created the object.
A value representing RGBA color (Red, Green, Blue, Alpha) for WebView2. Each component takes a value from 0 to 255, with 0 being no intensity and 255 being the highest intensity.
Contains the information packed into the LPARAM sent to a Win32 key event. For more information about WM_KEYDOWN, navigate to WM_KEYDOWN message.
Implement this structure to receive accessibility notification when accessibility events have been registered. The functions of this structure will be called on the UI thread.
Implement this structure to provide handler implementations. Methods will be called by the process and/or thread indicated.
Implement this structure to handle audio events.
Structure representing the audio parameters for setting up the audio handler.
Callback structure used for asynchronous continuation of authentication requests.
Callback structure used to asynchronously continue a download.
Structure representing a binary value. Can be used on any process and thread.
Settings used when initializing a CefBoxLayout.
Structure used to represent the browser process aspects of a browser. The functions of this structure can only be called in the browser process. They may be called on any thread in that process unless otherwise indicated in the comments.
Structure used to implement browser process callbacks. The functions of this structure will be called on the browser process main thread unless otherwise indicated.
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.
Structure used to represent a browser. When used in the browser process the functions of this structure may be called on any thread unless otherwise indicated in the comments. When used in the render process the functions of this structure may only be called on the main thread.
Generic callback structure used for asynchronous continuation.
Implement this structure to provide handler implementations.
Implement this structure to handle events related to commands. The functions of this structure will be called on the UI thread.
Structure 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 structure can be used before cef_initialize() is called.
Structure representing IME composition underline information. This is a thin wrapper around Blink's WebCompositionUnderline class and should be kept in sync with that.
Implement this structure to handle context menu events. The functions of this structure will be called on the UI thread.
Provides information about the context menu state. The functions of this structure can only be accessed on browser process the UI thread.
Implement this structure to filter cookies that may be sent or received from resource requests. The functions of this structure will be called on the IO thread unless otherwise indicated.
Structure used for managing cookies. The functions of this structure may be called on any thread unless otherwise indicated.
Cookie information.
Structure to implement for visiting cookie values. The functions of this structure will always be called on the UI thread.
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.
Structure to implement to be notified of asynchronous completion via
Callback structure for cef_browser_host_t::AddDevToolsMessageObserver. The functions of this structure will be called on the browser process UI thread.
Structure representing a dictionary value. Can be used on any process and thread.
Implement this structure to handle events related to browser display state. The functions of this structure will be called on the UI thread.
Structure used to represent a DOM node. The functions of this structure should only be called on the render process main thread.
Structure to implement for visiting the DOM. The functions of this structure will be called on the render process main thread.
Structure used to handle file downloads. The functions of this structure will called on the browser process UI thread.
Callback structure for cef_browser_host_t::DownloadImage. The functions of this structure will be called on the browser process UI thread.
Structure used to represent a download item.
Structure used to represent drag data. The functions of this structure may be called on any thread.
Implement this structure to handle events related to dragging. The functions of this structure will be called on the UI thread.
Structure representing a draggable region.
Implement this structure to receive notification when tracing has completed. The functions of this structure will be called on the browser process UI thread.
Object representing an extension. Methods may be called on any thread unless otherwise indicated.
Callback structure for asynchronous continuation of file dialog requests.
Implement this structure to handle events related to find results. The functions of this structure will be called on the UI thread.
Implement this structure to handle events related to focus. The functions of this structure will be called on the UI thread.
Implement this structure to handle events related to cef_frame_t life span. The order of callbacks is:
Structure used to represent a frame in the browser window. When used in the browser process the functions of this structure may be called on any thread unless otherwise indicated in the comments. When used in the render process the functions of this structure may only be called on the main thread.
Callback structure used for asynchronous continuation of
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 functions of this structure can be called on any browser process thread.
Structure representing insets.
Callback structure used for asynchronous continuation of JavaScript dialog requests.
Structure representing keyboard event information.
Implement this structure to handle events related to keyboard input. The functions of this structure will be called on the UI thread.
Implement this structure to handle events related to browser life span. The functions of this structure will be called on the UI thread unless otherwise indicated.
Structure representing a list value. Can be used on any process and thread.
Implement this structure to handle events related to browser load status. The functions of this structure will be called on the browser process UI thread or render process main thread (TID_RENDERER).
Callback structure used for asynchronous continuation of media access permission requests.
Implemented by the client to observe MediaRouter events and registered via
Callback structure for cef_media_router_t::CreateRoute. The functions of this structure will be called on the browser process UI thread.
Represents the route between a media source and sink. Instances of this object are created via cef_media_router_t::CreateRoute and retrieved via
Supports discovery of and communication with media devices on the local network via the Cast and DIAL protocols. The functions of this structure may be called on any browser process thread unless otherwise indicated.
Callback structure for cef_media_sink_t::GetDeviceInfo. The functions of this structure will be called on the browser process UI thread.
Device information for a MediaSink object.
Represents a sink to which media can be routed. Instances of this object are retrieved via cef_media_observer_t::OnSinks. The functions of this structure may be called on any browser process thread unless otherwise indicated.
Represents a source from which media can be routed. Instances of this object are retrieved via cef_media_router_t::GetSource. The functions of this structure may be called on any browser process thread unless otherwise indicated.
Implement this structure to handle menu model events. The functions of this structure will be called on the browser process UI thread unless otherwise indicated.
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 functions of this structure can only be accessed on the browser process the UI thread.
Structure representing mouse event information.
Structure used to represent an entry in navigation history.
Callback structure for cef_browser_host_t::GetNavigationEntries. The functions of this structure will be called on the browser process UI thread.
Callback structure for cef_browser_host_t::PrintToPDF. The functions of this structure will be called on the browser process UI thread.
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
Implement this structure to handle events related to permission requests. The functions of this structure will be called on the browser process UI thread.
Callback structure used for asynchronous continuation of permission prompts.
Structure representing a point.
Popup window features.
Structure used to represent a single element in the request post data. The functions of this structure may be called on any thread.
Structure used to represent post data for a web request. The functions of this structure may be called on any thread.
Structure that manages custom preference registrations.
Callback structure for asynchronous continuation of print dialog requests.
Implement this structure to handle printing on Linux. Each browser will have only one print job in progress at a time. The functions of this structure will be called on the browser process UI thread.
Structure representing print settings.
Structure representing a message. Can be used on any process and thread.
Structure representing a range.
Structure the client can implement to provide a custom stream reader. The functions of this structure may be called on any thread.
Structure representing a rectangle.
Generic callback structure used for managing the lifespan of a registration.
Implement this structure to handle events when window rendering is disabled. The functions of this structure will be called on the UI thread.
Structure used to implement render process callbacks. The functions of this structure will be called on the render process main thread (TID_RENDERER) unless otherwise indicated.
Implement this structure to provide handler implementations. The handler instance will not be released until all objects related to the context have been destroyed.
Request context initialization settings. Specify NULL or 0 to get the recommended default values.
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 cef_browser_host_t static factory functions or when creating a new URL request via the cef_urlrequest_t static factory functions. 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 cef_browser_host_t static factory function and all other request context objects will be ignored.
Implement this structure to handle events related to browser requests. The functions of this structure will be called on the thread indicated.
Structure used to represent a web request. The functions of this structure may be called on any thread.
Callback structure for cef_request_context_t::ResolveHost.
Structure used to implement a custom resource bundle structure. See CefSettings for additional options related to resource bundle loading. The functions of this structure may be called on multiple threads.
Structure used for retrieving resources from the resource bundle (*.pak) files loaded by CEF during startup or via the cef_resource_bundle_handler_t returned from cef_app_t::GetResourceBundleHandler. See CefSettings for additional options related to resource bundle loading. The functions of this structure may be called on any thread unless otherwise indicated.
Structure used to implement a custom request handler structure. The functions of this structure will be called on the IO thread unless otherwise indicated.
Implement this structure to handle events related to browser requests. The functions of this structure will be called on the IO thread unless otherwise indicated.
Callback for asynchronous continuation of cef_resource_handler_t::skip().
Implement this structure to filter resource response content. The functions of this structure will be called on the browser process IO thread.
Structure used to represent a web response. The functions of this structure may be called on any thread.
Callback structure used for continuation of custom context menu display.
Callback structure for cef_browser_host_t::RunFileDialog. The functions of this structure will be called on the browser process UI thread.
thread.
Structure that manages custom scheme registrations.
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.
Callback structure used to select a client certificate for authentication.
Implement this structure to handle HTTP server requests. A new thread will be created for each cef_server_t::CreateServer call (the "dedicated server thread"), and the functions of this structure will be called on that thread. It is therefore recommended to use a different cef_server_handler_t instance for each cef_server_t::CreateServer call to avoid thread safety issues in the cef_server_handler_t implementation.
Structure representing a server that supports HTTP and WebSocket requests. Server capacity is limited and is intended to handle only a small number of simultaneous connections (e.g. for communicating between applications on localhost). The functions of this structure are safe to call from any thread in the brower process unless otherwise indicated.
Structure to implement to be notified of asynchronous completion via
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.
Structure that wraps platform-dependent share memory region mapping.
Structure that builds a cef_process_message_t containing a shared memory region. This structure is not thread-safe but may be used exclusively on a different thread from the one which constructed it.
Structure representing a size.
Structure representing SSL information.
Structure representing the SSL information for a navigation entry.
Structure used to read data from a stream. The functions of this structure may be called on any thread.
Structure used to write data to a stream. The functions of this structure may be called on any thread.
Implement this structure to receive string values asynchronously.
cef_types.h list the common CEF threads. Task runners are also available for other CEF threads as appropriate (for example, V8 WebWorker threads).
Implement this structure for asynchronous task execution. If the task is posted successfully and if the associated message loop is still running then the execute() function 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.
A simple thread abstraction that establishes a message loop on a new thread. The consumer uses cef_task_runner_t to execute code on the thread's message loop. The thread is terminated when the cef_thread_t object is destroyed or stop() is called. All pending tasks queued on the thread's message loop will run to completion before the thread is terminated. cef_thread_create() can be called on any valid CEF thread in either the browser or render process. This structure should only be used for tasks that require a dedicated thread. In most cases you can post tasks to an existing CEF thread instead of creating a new one; see cef_task.h for details.
Structure representing touch event information.
Callback structure for asynchronous handling of an unresponsive process.
URL component parts.
Structure that should be implemented by the cef_urlrequest_t client. The functions of this structure will be called on the same thread that created the request unless otherwise documented.
Structure used to make a URL request. URL requests are not associated with a browser instance so no cef_client_t callbacks will be executed. URL requests can be created on any valid CEF thread in either the browser or render process. Once created the functions of the URL request object must be accessed on the same thread that created it.
Structure that should be implemented to handle V8 accessor calls. Accessor identifiers are registered by calling cef_v8value_t::set_value(). The functions of this structure will be called on the thread associated with the V8 accessor.
Callback structure that is passed to cef_v8value_t::CreateArrayBuffer.
Structure 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 cef_v8context_t::get_task_runner() function.
Structure representing a V8 exception. The functions of this structure may be called on any render process thread.
Structure that should be implemented to handle V8 function calls. The functions of this structure will be called on the thread associated with the V8 function.
Structure that should be implemented to handle V8 interceptor calls. The functions of this structure 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.
Structure 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 cef_v8context_t::get_task_runner() function.
Structure 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 cef_v8context_t::get_task_runner() function.
Structure 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 cef_v8context_t::get_task_runner() function.
Structure 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.
WaitableEvent is a thread synchronization tool that allows one thread to wait for another thread to finish some work. This is equivalent to using a Lock+ConditionVariable to protect a simple boolean value. However, using WaitableEvent in conjunction with a Lock to wait for a more complex state change (e.g., for an item to be added to a queue) is not recommended. In that case consider using a ConditionVariable instead of a WaitableEvent. It is safe to create and/or signal a WaitableEvent from any thread. Blocking on a WaitableEvent by calling the *wait() functions is not allowed on the browser process UI or IO threads.
Structure the client can implement to provide a custom stream writer. The functions of this structure may be called on any thread.
Structure representing the issuer or subject field of an X.509 certificate.
Structure representing a X.509 certificate.
Structure that supports the reading of XML data via the libxml streaming API. The functions of this structure should only be called on the thread that creates the object.
Structure that supports the reading of zip archives via the zlib unzip API. The functions of this structure should only be called on the thread that creates the object.
This gives access to the CEF functions. If you get a linker error for using an undefined function, it is probably because you did NOT go through this when dynamically loading.
WebView2 enables you to host web content using the latest Microsoft Edge browser and web technology.
Event args for the AcceleratorKeyPressed event.
This is This is a continuation of the ICoreWebView2AcceleratorKeyPressedEventArgs interface.
Receives AcceleratorKeyPressed events.
Receives the result of the AddScriptToExecuteOnDocumentCreated method.
Event args for the BasicAuthenticationRequested event. Will contain the request that led to the HTTP authorization challenge, the challenge and allows the host to provide authentication response or cancel the request.
The caller implements this interface to handle the BasicAuthenticationRequested event.
Represents a Basic HTTP authentication response that contains a user name and a password as according to RFC7617 (https://tools.ietf.org/html/rfc7617)
Provides a set of properties for managing an Extension, which includes an ID, name, and whether it is enabled or not, and the ability to Remove the Extension, and enable or disable it.
The caller implements this interface to receive the result of setting the browser Extension as enabled or disabled. If enabled, the browser Extension is running in WebView instances. If disabled, the browser Extension is not running in WebView instances.
Provides a set of properties for managing browser Extension Lists from user profile. This includes the number of browser Extensions in the list, and the ability to get an browser Extension from the list at a particular index.
The caller implements this interface to receive the result of removing the browser Extension from the Profile.
Event args for the BrowserProcessExited event.
Receives BrowserProcessExited events.
Implements the interface to receive BytesReceivedChanged event. Use the ICoreWebView2DownloadOperation.BytesReceived property to get the received bytes count.
Receives CallDevToolsProtocolMethod completion results.
Receives the result of the CapturePreview method. The result is written to the stream provided in the CapturePreview method.
Provides access to the certificate metadata.
The caller implements this interface to receive the ClearBrowsingData result.
Receives the result of the ClearServerCertificateErrorActions method.
Provides access to the client certificate metadata.
A collection of client certificate object.
Event args for the ClientCertificateRequested event.
An event handler for the ClientCertificateRequested event.
This interface is an extension of the ICoreWebView2Controller interface to support visual hosting. An object implementing the ICoreWebView2CompositionController interface will also implement ICoreWebView2Controller. Callers are expected to use ICoreWebView2Controller for resizing, visibility, focus, and so on, and then use ICoreWebView2CompositionController to connect to a composition tree and provide input meant for the WebView.
A continuation of the ICoreWebView2CompositionController interface.
This interface is the continuation of the ICoreWebView2CompositionController2 interface to manage drag and drop.
Receives ContainsFullScreenElementChanged events.
Event args for the ContentLoading event.
Receives ContentLoading events.
Represents a context menu item of a context menu displayed by WebView.
Represents a collection of ContextMenuItem objects. Used to get, remove and add ContextMenuItem objects at the specified index.
Event args for the ContextMenuRequested event. Will contain the selection information and a collection of all of the default context menu items that the WebView would show. Allows the app to draw its own context menu or add/remove from the default context menu.
Receives ContextMenuRequested events.
Represents the information regarding the context menu target. Includes the context selected and the appropriate data used for the actions of a context menu.
The owner of the CoreWebView2 object that provides support for resizing, showing and hiding, focusing, and other functionality related to windowing and composition. The CoreWebView2Controller owns the CoreWebView2, and if all references to the CoreWebView2Controller go away, the WebView is closed.
A continuation of the ICoreWebView2Controller interface.
A continuation of the ICoreWebView2Controller2 interface.
This is the ICoreWebView2Controller4 interface. The ICoreWebView2Controller4 provides interface to enable/disable external drop.
This interface is used to manage profile options that created by 'CreateCoreWebView2ControllerOptions'.
This is the interface in ControllerOptions for ScriptLocale.
Provides a set of properties that are used to manage an ICoreWebView2Cookie.
A list of cookie objects. See ICoreWebView2Cookie. \snippet ScenarioCookieManagement.cpp GetCookies
Creates, adds or updates, gets, or or view the cookies. The changes would apply to the context of the user profile. That is, other WebViews under the same user profile could be affected.
The caller implements this interface to receive the CoreWebView2Controller created via CreateCoreWebView2CompositionController.
Receives the CoreWebView2Controller created using CreateCoreWebView2Controller.
Receives the WebView2Environment created using CreateCoreWebView2Environment.
The caller implements this interface to receive CursorChanged events. Use the Cursor property to get the new cursor.
Raised to notify the host that the end user selected a custom ContextMenuItem. CustomItemSelected event is raised on the specific ContextMenuItem that the end user selected.
Represents the registration of a custom scheme with the CoreWebView2Environment. This allows the WebView2 app to be able to handle WebResourceRequested event for requests with the specified scheme and be able to navigate the WebView2 to the custom scheme. Once the environment is created, the registrations are valid and immutable throughout the lifetime of the associated WebView2s' browser process and any WebView2 environments sharing the browser process must be created with identical custom scheme registrations, otherwise the environment creation will fail. Any further attempts to register the same scheme will fail during environment creation. The URIs of registered custom schemes will be treated similar to http URIs for their origins. They will have tuple origins for URIs with host and opaque origins for URIs without host as specified in 7.5 Origin - HTML Living Standard
Event args for the DOMContentLoaded event.
Receives DOMContentLoaded events.
This interface is used to complete deferrals on event args that support getting deferrals using the GetDeferral method.
Event args for the DevToolsProtocolEventReceived event.
This is a continuation of the ICoreWebView2DevToolsProtocolEventReceivedEventArgs interface that provides the session ID of the target where the event originates from.
Receives DevToolsProtocolEventReceived events from the WebView.
A Receiver is created for a particular DevTools Protocol event and allows you to subscribe and unsubscribe from that event. Obtained from the WebView object using GetDevToolsProtocolEventReceiver.
Receives DocumentTitleChanged events. Use the DocumentTitle property to get the modified title.
Represents a download operation. Gives access to the download's metadata and supports a user canceling, pausing, or resuming the download.
Event args for the DownloadStarting event.
Add an event handler for the DownloadStarting event.
Represents the WebView2 Environment. WebViews created from an environment run on the browser process specified with environment parameters and objects created from an environment should be used in the same environment. Using it in different environments are not guaranteed to be compatible and may fail.
This interface is used to create ICoreWebView2ControllerOptions object, which can be passed as a parameter in CreateCoreWebView2ControllerWithOptions and CreateCoreWebView2CompositionControllerWithOptions function for multiple profiles support. The profile will be created on disk or opened when calling CreateCoreWebView2ControllerWithOptions or CreateCoreWebView2CompositionControllerWithOptions no matter InPrivate mode is enabled or not, and it will be released in memory when the corresponding controller is closed but still remain on disk. If you create a WebView2Controller with {ProfileName="name", InPrivate=false} and then later create another one with {ProfileName="name", InPrivate=true}, these two controllers using the same profile would be allowed to run at the same time. As WebView2 is built on top of Edge browser, it follows Edge's behavior pattern. To create an InPrivate WebView, we gets an off-the-record profile (an InPrivate profile) from a regular profile, then create the WebView with the off-the-record profile.
A continuation of the ICoreWebView2Environment interface for getting the crash dump folder path.
A continuation of the ICoreWebView2Environment interface for creating shared buffer object.
A continuation of the ICoreWebView2Environment interface for getting process with associated information.
A continuation of the ICoreWebView2Environment interface.
A continuation of the ICoreWebView2Environment2 interface.
A continuation of the ICoreWebView2Environment3 interface.
A continuation of the ICoreWebView2Environment4 interface that supports the BrowserProcessExited event.
This interface is an extension of the ICoreWebView2Environment that supports creating print settings for printing to PDF.
This interface is an extension of the ICoreWebView2Environment. An object implementing the ICoreWebView2Environment7 interface will also implement ICoreWebView2Environment.
A continuation of the ICoreWebView2Environment7 interface that supports the ProcessInfosChanged event.
A continuation of the ICoreWebView2Environment interface for creating CoreWebView2 ContextMenuItem objects.
Options used to create WebView2 Environment. A default implementation is provided in WebView2EnvironmentOptions.h.
Additional options used to create WebView2 Environment. A default implementation is provided in WebView2EnvironmentOptions.h.
Additional options used to create WebView2 Environment to manage crash reporting.
Additional options used to create WebView2 Environment that manages custom scheme registration.
Additional options used to create WebView2 Environment to manage tracking prevention.
Additional options used to create WebView2 Environment to manage browser extensions.
Implements the interface to receive EstimatedEndTimeChanged event. Use the ICoreWebView2DownloadOperation.EstimatedEndTime property to get the new estimated end time.
Receives the result of the ExecuteScript method.
This interface is a handler for when the Favicon is changed. The sender is the ICoreWebView2 object the top-level document of which has changed favicon and the eventArgs is nullptr. Use the FaviconUri property and GetFavicon method to obtain the favicon data. The second argument is always null. For more information see add_FaviconChanged.
Representation of a DOM File object passed via WebMessage. You can use this object to obtain the path of a File dropped on WebView2. \snippet ScenarioDragDrop.cpp DroppedFilePath
Receives GotFocus and LostFocus events.
ICoreWebView2Frame provides direct access to the iframes information. You can get an ICoreWebView2Frame by handling the ICoreWebView2_4::add_FrameCreated event.
A continuation of the ICoreWebView2Frame interface with navigation events, executing script and posting web messages.
This is an extension of the ICoreWebView2Frame interface that supports PermissionRequested
This is an extension of the ICoreWebView2Frame interface that supports shared buffer based on file mapping.
This is an extension of the ICoreWebView2Frame interface that provides the FrameId property.
Receives ContentLoading events for iframe.
Event args for the FrameCreated events.
Receives FrameCreated event.
Receives DOMContentLoaded events for iframe.
Receives FrameDestroyed event.
Provides a set of properties for a frame in the ICoreWebView2.
A continuation of the ICoreWebView2FrameInfo interface that provides ParentFrameInfo, FrameId and FrameKind properties.
Collection of FrameInfos (name and source). Used to list the affected frames' info when a frame-only render process failure occurs in the ICoreWebView2.
Iterator for a collection of FrameInfos. For more info, see ICoreWebView2ProcessFailedEventArgs2 and ICoreWebView2FrameInfoCollection.
Receives FrameNameChanged event.
Receives NavigationCompleted events for iframe.
Receives NavigationStarting events for iframe.
Receives PermissionRequested events for iframes.
Receives WebMessageReceived events for iframe.
Receives the result of the GetCookies method. The result is written to the cookie list provided in the GetCookies method call.
This interface is a handler for the completion of the population of imageStream. errorCode returns S_OK if the API succeeded. The image is returned in the faviconStream object. If there is no image then no data would be copied into the imageStream. For more details, see the GetFavicon API.
The caller implements this interface to handle the result of GetNonDefaultPermissionSettings.
Receives the result of the GetProcessExtendedInfos method. The result is written to the collection of ProcessExtendedInfos provided in the GetProcessExtendedInfos method call.
Receives HistoryChanged events.
Iterator for a collection of HTTP headers. For more information, navigate to ICoreWebView2HttpRequestHeaders and ICoreWebView2HttpResponseHeaders.
HTTP request headers. Used to inspect the HTTP request on WebResourceRequested event and NavigationStarting event.
HTTP response headers. Used to construct a WebResourceResponse for the WebResourceRequested event.
Implements the interface to receive IsDefaultDownloadDialogOpenChanged events.
Implements the interface to receive IsDocumentPlayingAudioChanged events. Use the IsDocumentPlayingAudio property to get the audio playing state.
Implements the interface to receive IsMutedChanged events. Use the IsMuted property to get the mute state.
Event args for LaunchingExternalUriScheme event.
Event handler for the LaunchingExternalUriScheme event.
Event args for the MoveFocusRequested event.
Receives MoveFocusRequested events.
Event args for the NavigationCompleted event.
This is an interface for the StatusCode property of ICoreWebView2NavigationCompletedEventArgs
Receives NavigationCompleted events.
Event args for the NavigationStarting event.
The AdditionalAllowedFrameAncestors API that enable developers to provide additional allowed frame ancestors.
The NavigationKind API that enables developers to get more information about navigation type.
Receives NavigationStarting events.
Receives NewBrowserVersionAvailable events.
Event args for the NewWindowRequested event. The event is run when content inside webview requested to a open a new window (through window.open() and so on).
This is a continuation of the ICoreWebView2NewWindowRequestedEventArgs interface.
This is a continuation of the ICoreWebView2NewWindowRequestedEventArgs interface.
Receives NewWindowRequested events.
Read-only collection of generic objects.
Event args for the PermissionRequested event.
This is a continuation of the ICoreWebView2PermissionRequestedEventArgs interface.
This is a continuation of the ICoreWebView2PermissionRequestedEventArgs2 interface.
Receives PermissionRequested events.
Provides a set of properties for a permission setting.
Read-only collection of PermissionSettings (origin, kind, and state). Used to list the nondefault permission settings on the profile that are persisted across sessions.
This mostly represents a combined win32 POINTER_INFO/POINTER_TOUCH_INFO/POINTER_PEN_INFO object. It takes fields from all three and excludes some win32 specific data types like HWND and HANDLE. Note, sourceDevice is taken out but we expect the PointerDeviceRect and DisplayRect to cover the existing use cases of sourceDevice. Another big difference is that any of the point or rect locations are expected to be in WebView physical coordinates. That is, coordinates relative to the WebView and no DPI scaling applied.
Receives the result of the Print method.
Settings used by the PrintToPdf method.
Settings used by the Print method.
Receives the result of the PrintToPdf method. If the print to PDF operation succeeds, isSuccessful is true. Otherwise, if the operation failed, isSuccessful is set to false. An invalid path returns E_INVALIDARG.
Receives the result of the PrintToPdfStream method. errorCode returns S_OK if the PrintToPdfStream operation succeeded. The printable pdf data is returned in the pdfStream object.
Provides process with associated extended information in the ICoreWebView2Environment.
A list containing processInfo and associated extended information.
Event args for the ProcessFailed event.
A continuation of the ICoreWebView2ProcessFailedEventArgs interface.
Receives ProcessFailed events.
Provides a set of properties for a process in the ICoreWebView2Environment.
A list containing process id and corresponding process type.
An event handler for the ProcessInfosChanged event.
Provides a set of properties to configure a Profile object.
Profile2 interface.
This is an extension of the ICoreWebView2Profile interface to control levels of tracking prevention.
This is the ICoreWebView2Profile interface for the permission management APIs.
This is the ICoreWebView2Profile interface for cookie manager.
Interfaces in profile for managing password-autosave and general-autofill.
Interfaces in profile for managing browser extensions.
This is the profile interface that manages profile deletion.
The caller implements this interface to receive the result of loading an browser Extension.
Receives the CoreWebView2Profile.Deleted event.
The caller implements this interface to receive the result of getting the browser Extensions.
Receives RasterizationScaleChanged events. Use the RasterizationScale property to get the modified scale.
Event args for the ScriptDialogOpening event.
Receives ScriptDialogOpening events.
Event args for the ServerCertificateErrorDetected event.
An event handler for the ServerCertificateErrorDetected event.
The caller implements this interface to handle the result of SetPermissionState.
Defines properties that enable, disable, or modify WebView features. Changes to IsGeneralAutofillEnabled and IsPasswordAutosaveEnabled apply immediately, while other setting changes made after NavigationStarting event do not apply until the next top-level navigation.
A continuation of the ICoreWebView2Settings interface that manages the user agent.
A continuation of the ICoreWebView2Settings interface that manages whether browser accelerator keys are enabled.
A continuation of the ICoreWebView2Settings interface to manage autofill.
A continuation of the ICoreWebView2Settings interface to manage pinch zoom.
A continuation of the ICoreWebView2Settings interface to manage swipe navigation.
A continuation of the ICoreWebView2Settings interface to hide Pdf toolbar items.
A continuation of the ICoreWebView2Settings interface to manage smartscreen.
The shared buffer object that is created by CreateSharedBuffer. The object is presented to script as ArrayBuffer when posted to script with PostSharedBufferToScript.
Event args for the SourceChanged event.
Receives SourceChanged events.
Implements the interface to receive StateChanged event. Use the ICoreWebView2DownloadOperation.State property to get the current state, which can be in progress, interrupted, or completed. Use the ICoreWebView2DownloadOperation.InterruptReason property to get the interrupt reason if the download is interrupted.
Receives StatusBarTextChanged events.
A collection of strings.
The caller implements this interface to receive the TrySuspend result.
Event args for the WebMessageReceived event.
Extension of WebMessageReceivedEventArgs to provide access to additional WebMessage objects.
Receives WebMessageReceived events.
An HTTP request used with the WebResourceRequested event.
Event args for the WebResourceRequested event.
Runs when a URL request (through network, file, and so on) is made in the webview for a Web resource matching resource context filter and URL specified in AddWebResourceRequestedFilter. The host views and modifies the request or provide a response in a similar pattern to HTTP, in which case the request immediately completed. This may not contain any request headers that are added by the network stack, such as an Authorization header.
An HTTP response used with the WebResourceRequested event.
Event args for the WebResourceResponseReceived event.
Receives WebResourceResponseReceived events.
View of the HTTP representation for a web resource response. The properties of this object are not mutable. This response view is used with the WebResourceResponseReceived event.
Receives the result of the ICoreWebView2WebResourceResponseView::GetContent method.
Receives WindowCloseRequested events.
The window features for a WebView popup window. The fields match the windowFeatures passed to window.open as specified in Window features
on MDN.
Implements the interface to receive ZoomFactorChanged events. Use the ICoreWebView2Controller.ZoomFactor property to get the modified zoom factor.
This interface is an extension of ICoreWebView2_9 that supports BasicAuthenticationRequested event.
This interface is an extension of ICoreWebView2_10 that supports sessionId for CDP method calls and ContextMenuRequested event.
This interface is an extension of ICoreWebView2_11 that supports StatusBarTextChanged event.
This interface is an extension of ICoreWebView2_12 that supports Profile API.
This interface is an extension of ICoreWebView2_13 that adds ServerCertificate support.
This interface is an extension of ICoreWebView2_14 that supports status Favicons.
A continuation of the ICoreWebView2 interface to support printing.
This interface is an extension of ICoreWebView2_16 that supports shared buffer based on file mapping.
This interface is an extension of ICoreWebView2_17 that manages navigation requests to URI schemes registered with the OS.
This interface is an extension of ICoreWebView2_18 that manages memory usage target level.
A continuation of the ICoreWebView2 interface.
This interface is an extension of ICoreWebView2_19 that provides the FrameId property.
A continuation of the ICoreWebView2_2 interface.
A continuation of the ICoreWebView2_3 interface to support FrameCreated and DownloadStarting events.
A continuation of the ICoreWebView2_4 interface to support ClientCertificateRequested event.
This interface is an extension of ICoreWebView2_5 that manages opening the browser task manager window.
This interface is an extension of ICoreWebView2_6 that supports printing to PDF.
This interface is an extension of ICoreWebView2_7 that supports media features.
This interface is an extension of ICoreWebView2_8 that default download dialog positioning and anchoring.
I currently built against the version listed below and it uses UTF-16 strings.
July 2024-present: 126.2.10+g61241e4+chromium-126.0.6478.127
November 2023: cef_binary_119.3.1+gf768881+chromium-119.0.6045.124_linux64_minimal.tar.bz2
November 2022: cef_binary_107.1.9+g1f0a21a+chromium-107.0.5304.110_linux64_minimal.tar.bz2
November 2021: 95.7.17+g4208276+chromium-95.0.4638.69
Note my ceftranslate.d for instructions to start the update process.
Then to install the cef put in the Resources in the Release directory (*.pak and *.dat out of Resources, failure to do this will cause an abort on ICU file descriptor things) and copy the locales to /opt/cef/Resources/Locales
You can download compatible builds from https://cef-builds.spotifycdn.com/index.html just make sure to put in the version filter and check "all builds" to match it.
You do NOT actually need the cef to build the application, but it must be on the user's machine to run it. It looks in /opt/cef/ on Linux.
Work in progress. DO NOT USE YET as I am prolly gonna break everything too.
On Windows, you need to distribute the WebView2Loader.dll with your exe. That is found in the web view 2 sdk. Furthermore, users will have to install the runtime.
Please note; the Microsoft terms and conditions say they may be able to collect information about your users if you use this on Windows. see: https://developer.microsoft.com/en-us/microsoft-edge/webview2/
A web view wrapper. Uses CEF on Linux and WebView2 on Windows.
Microsoft WebView2 is fairly stable and is unlikely to break, but CEF is not remotely stable and likely to break every release. You'll have to get the same version as me to use this unless you want to generate your own bindings (procedure found in the file comments). Details below.