_cef_render_process_handler_t

Struct _cef_render_process_handler_t 

Source
#[repr(C)]
pub struct _cef_render_process_handler_t { pub base: cef_base_ref_counted_t, pub on_web_kit_initialized: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t)>, pub on_browser_created: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, extra_info: *mut _cef_dictionary_value_t)>, pub on_browser_destroyed: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t)>, pub get_load_handler: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t) -> *mut _cef_load_handler_t>, pub on_context_created: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, frame: *mut _cef_frame_t, context: *mut _cef_v8_context_t)>, pub on_context_released: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, frame: *mut _cef_frame_t, context: *mut _cef_v8_context_t)>, pub on_uncaught_exception: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, frame: *mut _cef_frame_t, context: *mut _cef_v8_context_t, exception: *mut _cef_v8_exception_t, stackTrace: *mut _cef_v8_stack_trace_t)>, pub on_focused_node_changed: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, frame: *mut _cef_frame_t, node: *mut _cef_domnode_t)>, pub on_process_message_received: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, frame: *mut _cef_frame_t, source_process: cef_process_id_t, message: *mut _cef_process_message_t) -> c_int>, }
Expand description

Structure used to implement render process callbacks. The functions of this structure will be called on the render process main thread (TID_RENDERER) unless otherwise indicated.

NOTE: This struct is allocated client-side.

Fields§

§base: cef_base_ref_counted_t

Base structure.

§on_web_kit_initialized: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t)>

Called after WebKit has been initialized.

§on_browser_created: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, extra_info: *mut _cef_dictionary_value_t)>

Called after a browser has been created. When browsing cross-origin a new browser will be created before the old browser with the same identifier is destroyed. |extra_info| is an optional read-only value originating from cef_browser_host_t::cef_browser_host_create_browser(), cef_browser_host_t::cef_browser_host_create_browser_sync(), cef_life_span_handler_t::on_before_popup() or cef_browser_view_t::cef_browser_view_create().

§on_browser_destroyed: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t)>

Called before a browser is destroyed.

§get_load_handler: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t) -> *mut _cef_load_handler_t>

Return the handler for browser load status events.

§on_context_created: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, frame: *mut _cef_frame_t, context: *mut _cef_v8_context_t)>

Called immediately after the V8 context for a frame has been created. To retrieve the JavaScript ‘window’ object use the cef_v8_context_t::get_global() function. V8 handles can only be accessed from the thread on which they are created. A task runner for posting tasks on the associated thread can be retrieved via the cef_v8_context_t::get_task_runner() function.

§on_context_released: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, frame: *mut _cef_frame_t, context: *mut _cef_v8_context_t)>

Called immediately before the V8 context for a frame is released. No references to the context should be kept after this function is called.

§on_uncaught_exception: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, frame: *mut _cef_frame_t, context: *mut _cef_v8_context_t, exception: *mut _cef_v8_exception_t, stackTrace: *mut _cef_v8_stack_trace_t)>

Called for global uncaught exceptions in a frame. Execution of this callback is disabled by default. To enable set cef_settings_t.uncaught_exception_stack_size > 0.

§on_focused_node_changed: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, frame: *mut _cef_frame_t, node: *mut _cef_domnode_t)>

Called when a new node in the the browser gets focus. The |node| value may be NULL if no specific node has gained focus. The node object passed to this function represents a snapshot of the DOM at the time this function is executed. DOM objects are only valid for the scope of this function. Do not keep references to or attempt to access any DOM objects outside the scope of this function.

§on_process_message_received: Option<unsafe extern "C" fn(self_: *mut _cef_render_process_handler_t, browser: *mut _cef_browser_t, frame: *mut _cef_frame_t, source_process: cef_process_id_t, message: *mut _cef_process_message_t) -> c_int>

Called when a new message is received from a different process. Return true (1) if the message was handled or false (0) otherwise. It is safe to keep a reference to |message| outside of this callback.

Trait Implementations§

Source§

impl Clone for _cef_render_process_handler_t

Source§

fn clone(&self) -> _cef_render_process_handler_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_render_process_handler_t

Source§

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

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

impl Copy for _cef_render_process_handler_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.