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
impl MessageRouterRendererSide
Sourcepub fn on_web_kit_initialized(identifier: &str) -> Self
pub fn on_web_kit_initialized(identifier: &str) -> Self
The functions for JS query and cancel are ${identifier}_query and ${identifier}_cancel
pub fn get_context(&mut self, context_id: ContextId) -> Option<V8Context>
Sourcepub fn v8_get_or_create_context_id(&mut self, context: &V8Context) -> ContextId
pub fn v8_get_or_create_context_id(&mut self, context: &V8Context) -> ContextId
In general we only care about THIS conetxt.
pub fn on_context_released( &mut self, _browser: &mut Browser, frame: &mut Frame, context: &mut V8Context, )
Sourcepub fn on_context_created(
&mut self,
router: Arc<RwLock<MessageRouterRendererSide>>,
_browser: &mut Browser,
_frame: &mut Frame,
context: &mut V8Context,
)
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.
pub fn send_query( &mut self, _browser: Browser, frame: Frame, request: RequestInfo, ) -> RequestId
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§
impl !Freeze for MessageRouterRendererSide
impl !RefUnwindSafe for MessageRouterRendererSide
impl Send for MessageRouterRendererSide
impl Sync for MessageRouterRendererSide
impl Unpin for MessageRouterRendererSide
impl !UnwindSafe for MessageRouterRendererSide
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more