MessageRouterRendererSide

Struct MessageRouterRendererSide 

Source
pub struct MessageRouterRendererSide { /* private fields */ }
Expand description

Its a more or less re implementation of the wrapper/cef_message_router system The interface is not the same however as I implemented the different features on a “as needed” basis

Implementations§

Source§

impl MessageRouterRendererSide

Source

pub fn on_web_kit_initialized(identifier: &str) -> Self

The functions for JS query and cancel are ${identifier}_query and ${identifier}_cancel

Source

pub fn get_context(&mut self, context_id: ContextId) -> Option<V8Context>

Source

pub fn v8_get_or_create_context_id(&mut self, context: &V8Context) -> ContextId

In general we only care about THIS conetxt.

Source

pub fn on_context_released( &mut self, _browser: &mut Browser, frame: &mut Frame, context: &mut V8Context, )

Source

pub fn on_context_created( &mut self, router: Arc<RwLock<MessageRouterRendererSide>>, _browser: &mut Browser, _frame: &mut Frame, context: &mut V8Context, )

Should be called when the context is created. This attaches the javascript functions to the global window object in the tab NOTE: Ironically we are creating this for way more contexts than we are gonna need it for. BUT we don’t know which context is “ours” or the one we care about so this is kinda the only option we got. Seems a bit wasteful but the reference does it this way as well.

Source

pub fn send_query( &mut self, _browser: Browser, frame: Frame, request: RequestInfo, ) -> RequestId

Source

pub fn on_process_message_received( &mut self, _browser: Option<&mut Browser>, _frame: Option<&mut Frame>, _source_process: ProcessId, message: Option<&mut ProcessMessage>, ) -> i32

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, U> ConvertParam<U> for T
where T: Into<U>,

Source§

fn into_raw(self) -> U

Source§

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

Source§

fn wrap_result(self) -> U

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, 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.