Chromium Embedded Framework (CEF)  107.1.0+g0bd2c19+chromium-107.0.5304.29
cef_app.h File Reference

Classes

class  CefApp
 Implement this interface to provide handler implementations. More...
 

Functions

int CefExecuteProcess (const CefMainArgs &args, CefRefPtr< CefApp > application, void *windows_sandbox_info)
 This function should be called from the application entry point function to execute a secondary process. More...
 
bool CefInitialize (const CefMainArgs &args, const CefSettings &settings, CefRefPtr< CefApp > application, void *windows_sandbox_info)
 This function should be called on the main application thread to initialize the CEF browser process. More...
 
void CefShutdown ()
 This function should be called on the main application thread to shut down the CEF browser process before the application exits. More...
 
void CefDoMessageLoopWork ()
 Perform a single iteration of CEF message loop processing. More...
 
void CefRunMessageLoop ()
 Run the CEF message loop. More...
 
void CefQuitMessageLoop ()
 Quit the CEF message loop that was started by calling CefRunMessageLoop(). More...
 
void CefSetOSModalLoop (bool osModalLoop)
 Set to true before calling Windows APIs like TrackPopupMenu that enter a modal message loop. More...
 
void CefEnableHighDPISupport ()
 Call during process startup to enable High-DPI support on Windows 7 or newer. More...
 

Function Documentation

◆ CefDoMessageLoopWork()

void CefDoMessageLoopWork ( )

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.

◆ CefEnableHighDPISupport()

void CefEnableHighDPISupport ( )

Call during process startup to enable High-DPI support on Windows 7 or newer.

Older versions of Windows should be left DPI-unaware because they do not support DirectWrite and GDI fonts are kerned very badly.

◆ CefExecuteProcess()

int CefExecuteProcess ( const CefMainArgs args,
CefRefPtr< CefApp application,
void *  windows_sandbox_info 
)

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).

◆ CefInitialize()

bool CefInitialize ( const CefMainArgs args,
const CefSettings settings,
CefRefPtr< CefApp application,
void *  windows_sandbox_info 
)

This function should be called on the main application thread to initialize the CEF browser process.

The |application| parameter may be empty. A return value of true indicates that it succeeded and false indicates that it failed. The |windows_sandbox_info| parameter is only used on Windows and may be NULL (see cef_sandbox_win.h for details).

◆ CefQuitMessageLoop()

void CefQuitMessageLoop ( )

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.

◆ CefRunMessageLoop()

void CefRunMessageLoop ( )

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.

◆ CefSetOSModalLoop()

void CefSetOSModalLoop ( bool  osModalLoop)

Set to true before calling Windows APIs like TrackPopupMenu that enter a modal message loop.

Set to false after exiting the modal message loop.

◆ CefShutdown()

void CefShutdown ( )

This function should be called on the main application thread to shut down the CEF browser process before the application exits.