_cef_browser_view_delegate_t

Struct _cef_browser_view_delegate_t 

Source
#[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_t

Base 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

Source§

fn clone(&self) -> _cef_browser_view_delegate_t

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for _cef_browser_view_delegate_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for _cef_browser_view_delegate_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.