#[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(self_: *mut _cef_extension_handler_t, result: cef_errorcode_t)>,
pub on_extension_loaded: Option<unsafe extern "C" fn(self_: *mut _cef_extension_handler_t, extension: *mut _cef_extension_t)>,
pub on_extension_unloaded: Option<unsafe extern "C" fn(self_: *mut _cef_extension_handler_t, extension: *mut _cef_extension_t)>,
pub on_before_background_browser: Option<unsafe extern "C" fn(self_: *mut _cef_extension_handler_t, extension: *mut _cef_extension_t, url: *const cef_string_t, client: *mut *mut _cef_client_t, settings: *mut _cef_browser_settings_t) -> c_int>,
pub on_before_browser: Option<unsafe extern "C" fn(self_: *mut _cef_extension_handler_t, extension: *mut _cef_extension_t, browser: *mut _cef_browser_t, active_browser: *mut _cef_browser_t, index: c_int, url: *const cef_string_t, active: c_int, windowInfo: *mut _cef_window_info_t, client: *mut *mut _cef_client_t, settings: *mut _cef_browser_settings_t) -> c_int>,
pub get_active_browser: Option<unsafe extern "C" fn(self_: *mut _cef_extension_handler_t, extension: *mut _cef_extension_t, browser: *mut _cef_browser_t, include_incognito: c_int) -> *mut _cef_browser_t>,
pub can_access_browser: Option<unsafe extern "C" fn(self_: *mut _cef_extension_handler_t, extension: *mut _cef_extension_t, browser: *mut _cef_browser_t, include_incognito: c_int, target_browser: *mut _cef_browser_t) -> c_int>,
pub get_extension_resource: Option<unsafe extern "C" fn(self_: *mut _cef_extension_handler_t, extension: *mut _cef_extension_t, browser: *mut _cef_browser_t, file: *const cef_string_t, callback: *mut _cef_get_extension_resource_callback_t) -> c_int>,
}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.
Fields§
§base: cef_base_ref_counted_tBase structure.
on_extension_load_failed: Option<unsafe extern "C" fn(self_: *mut _cef_extension_handler_t, result: 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(self_: *mut _cef_extension_handler_t, extension: *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(self_: *mut _cef_extension_handler_t, extension: *mut _cef_extension_t)>Called after the cef_extension_t::Unload request has completed.
on_before_background_browser: Option<unsafe extern "C" fn(self_: *mut _cef_extension_handler_t, extension: *mut _cef_extension_t, url: *const cef_string_t, client: *mut *mut _cef_client_t, settings: *mut _cef_browser_settings_t) -> c_int>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 “