pub type cef_extension_handler_t = _cef_extension_handler_t;Expand description
Implement this structure to handle events related to browser extensions. The functions of this structure will be called on the UI thread. See cef_request_context_t::LoadExtension for information about extension loading.
Aliased Type§
#[repr(C)]pub struct cef_extension_handler_t {
pub base: _cef_base_ref_counted_t,
pub on_extension_load_failed: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, cef_errorcode_t)>,
pub on_extension_loaded: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, *mut _cef_extension_t)>,
pub on_extension_unloaded: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, *mut _cef_extension_t)>,
pub on_before_background_browser: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, *mut _cef_extension_t, *const _cef_string_utf16_t, *mut *mut _cef_client_t, *mut _cef_browser_settings_t) -> i32>,
pub on_before_browser: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, *mut _cef_extension_t, *mut _cef_browser_t, *mut _cef_browser_t, i32, *const _cef_string_utf16_t, i32, *mut _cef_window_info_t, *mut *mut _cef_client_t, *mut _cef_browser_settings_t) -> i32>,
pub get_active_browser: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, *mut _cef_extension_t, *mut _cef_browser_t, i32) -> *mut _cef_browser_t>,
pub can_access_browser: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, *mut _cef_extension_t, *mut _cef_browser_t, i32, *mut _cef_browser_t) -> i32>,
pub get_extension_resource: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, *mut _cef_extension_t, *mut _cef_browser_t, *const _cef_string_utf16_t, *mut _cef_get_extension_resource_callback_t) -> i32>,
}Fields§
§base: _cef_base_ref_counted_tBase structure.
on_extension_load_failed: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, cef_errorcode_t)>Called if the cef_request_context_t::LoadExtension request fails. |result| will be the error code.
on_extension_loaded: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, *mut _cef_extension_t)>Called if the cef_request_context_t::LoadExtension request succeeds. |extension| is the loaded extension.
on_extension_unloaded: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, *mut _cef_extension_t)>Called after the cef_extension_t::Unload request has completed.
on_before_background_browser: Option<unsafe extern "C" fn(*mut _cef_extension_handler_t, *mut _cef_extension_t, *const _cef_string_utf16_t, *mut *mut _cef_client_t, *mut _cef_browser_settings_t) -> i32>Called when an extension needs a browser to host a background script specified via the “background” manifest key. The browser will have no visible window and cannot be displayed. |extension| is the extension that is loading the background script. |url| is an internally generated reference to an HTML page that will be used to load the background script via a “