cef_life_span_handler_t

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.

Members

Variables

base
cef_base_ref_counted_t base;

Base structure.

do_close
int function(cef_life_span_handler_t* self, cef_browser_t* browser) nothrow do_close;

Called when a browser has received a request to close. This may result directly from a call to cef_browser_host_t::*close_browser() or indirectly if the browser is parented to a top-level window created by CEF and the user attempts to close that window (by clicking the 'X', for example). The do_close() function will be called after the JavaScript 'onunload' event has been fired.

on_after_created
void function(cef_life_span_handler_t* self, cef_browser_t* browser) nothrow on_after_created;

Called after a new browser is created. It is now safe to begin performing actions with |browser|. cef_frame_handler_t callbacks related to initial main frame creation will arrive before this callback. See cef_frame_handler_t documentation for additional usage information.

on_before_close
void function(cef_life_span_handler_t* self, cef_browser_t* browser) nothrow on_before_close;

Called just before a browser is destroyed. Release all references to the browser object and do not attempt to execute any functions on the browser object (other than IsValid, GetIdentifier or IsSame) after this callback returns. cef_frame_handler_t callbacks related to final main frame destruction will arrive after this callback and cef_browser_t::IsValid will return false (0) at that time. Any in-progress network requests associated with |browser| will be aborted when the browser is destroyed, and cef_resource_request_handler_t callbacks related to those requests may still arrive on the IO thread after this callback. See cef_frame_handler_t and do_close() documentation for additional usage information.

on_before_dev_tools_popup
void function(cef_life_span_handler_t* self, cef_browser_t* browser, cef_window_info_t* windowInfo, cef_client_t** client, cef_browser_settings_t* settings, cef_dictionary_value_t** extra_info, int* use_default_window) nothrow on_before_dev_tools_popup;

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

on_before_popup
int function(cef_life_span_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, const(cef_string_t)* target_url, const(cef_string_t)* target_frame_name, cef_window_open_disposition_t target_disposition, int user_gesture, const(cef_popup_features_t)* popupFeatures, cef_window_info_t* windowInfo, cef_client_t** client, cef_browser_settings_t* settings, cef_dictionary_value_t** extra_info, int* no_javascript_access) nothrow on_before_popup;

clicking a link) or false (0) 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 (0). To cancel creation of the popup browser return true (1). The |client| and |settings| values will default to the source browser's values. If the |no_javascript_access| value is set to false (0) 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 cef_browser_view_t. Popup browser creation will be canceled if the parent browser is destroyed before the popup browser creation completes (indicated by a call to OnAfterCreated for the popup browser). The |extra_info| parameter provides an opportunity to specify extra information specific to the created popup browser that will be passed to

Meta