#[repr(C)]pub struct _cef_browser_view_delegate_t {
pub base: cef_view_delegate_t,
pub on_browser_created: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t, browser: *mut _cef_browser_t)>,
pub on_browser_destroyed: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t, browser: *mut _cef_browser_t)>,
pub get_delegate_for_popup_browser_view: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t, settings: *const _cef_browser_settings_t, client: *mut _cef_client_t, is_devtools: c_int) -> *mut _cef_browser_view_delegate_t>,
pub on_popup_browser_view_created: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t, popup_browser_view: *mut _cef_browser_view_t, is_devtools: c_int) -> c_int>,
pub get_chrome_toolbar_type: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t) -> cef_chrome_toolbar_type_t>,
pub use_frameless_window_for_picture_in_picture: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t) -> c_int>,
pub on_gesture_command: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t, gesture_command: cef_gesture_command_t) -> c_int>,
pub get_browser_runtime_style: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t) -> cef_runtime_style_t>,
pub allow_move_for_picture_in_picture: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t) -> c_int>,
}Expand description
Implement this structure to handle BrowserView events. The functions of this structure will be called on the browser process UI thread unless otherwise indicated.
NOTE: This struct is allocated client-side.
Fields§
§base: cef_view_delegate_tBase structure.
on_browser_created: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t, browser: *mut _cef_browser_t)>Called when |browser| associated with |browser_view| is created. This function will be called after cef_life_span_handler_t::on_after_created() is called for |browser| and before on_popup_browser_view_created() is called for |browser|’s parent delegate if |browser| is a popup.
on_browser_destroyed: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t, browser: *mut _cef_browser_t)>Called when |browser| associated with |browser_view| is destroyed. Release all references to |browser| and do not attempt to execute any functions on |browser| after this callback returns. This function will be called before cef_life_span_handler_t::on_before_close() is called for |browser|.
get_delegate_for_popup_browser_view: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t, settings: *const _cef_browser_settings_t, client: *mut _cef_client_t, is_devtools: c_int) -> *mut _cef_browser_view_delegate_t>Called before a new popup BrowserView is created. The popup originated from |browser_view|. |settings| and |client| are the values returned from cef_life_span_handler_t::on_before_popup(). |is_devtools| will be true (1) if the popup will be a DevTools browser. Return the delegate that will be used for the new popup BrowserView.
on_popup_browser_view_created: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t, popup_browser_view: *mut _cef_browser_view_t, is_devtools: c_int) -> c_int>Called after |popup_browser_view| is created. This function will be called after cef_life_span_handler_t::on_after_created() and on_browser_created() are called for the new popup browser. The popup originated from |browser_view|. |is_devtools| will be true (1) if the popup is a DevTools browser. Optionally add |popup_browser_view| to the views hierarchy yourself and return true (1). Otherwise return false (0) and a default cef_window_t will be created for the popup.
get_chrome_toolbar_type: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t) -> cef_chrome_toolbar_type_t>Returns the Chrome toolbar type that will be available via cef_browser_view_t::get_chrome_toolbar(). See that function for related documentation.
use_frameless_window_for_picture_in_picture: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t) -> c_int>Return true (1) to create frameless windows for Document picture-in- picture popups. Content in frameless windows should specify draggable regions using “-webkit-app-region: drag” CSS.
on_gesture_command: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t, gesture_command: cef_gesture_command_t) -> c_int>Called when |browser_view| receives a gesture command. Return true (1) to handle (or disable) a |gesture_command| or false (0) to propagate the gesture to the browser for default handling. With Chrome style these commands can also be handled via cef_command_handler_t::OnChromeCommand.
get_browser_runtime_style: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t) -> cef_runtime_style_t>Optionally change the runtime style for this BrowserView. See cef_runtime_style_t documentation for details.
allow_move_for_picture_in_picture: Option<unsafe extern "C" fn(self_: *mut _cef_browser_view_delegate_t, browser_view: *mut _cef_browser_view_t) -> c_int>Return true (1) to allow the use of JavaScript moveTo/By() and resizeTo/By() (without user activation) with Document picture-in-picture popups.
Trait Implementations§
Source§impl Clone for _cef_browser_view_delegate_t
impl Clone for _cef_browser_view_delegate_t
Source§fn clone(&self) -> _cef_browser_view_delegate_t
fn clone(&self) -> _cef_browser_view_delegate_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more