pub struct FrameManager { /* private fields */ }
Expand description
Maintains the state of the pages frame and listens to events produced by
chromium targeting the Target
. Also listens for events that indicate that
a navigation was completed
Implementations§
Source§impl FrameManager
impl FrameManager
pub fn new(request_timeout: Duration) -> Self
Sourcepub fn init_commands(timeout: Duration) -> CommandChain
pub fn init_commands(timeout: Duration) -> CommandChain
The commands to execute in order to initialize this frame manager
pub fn main_frame(&self) -> Option<&Frame>
pub fn main_frame_mut(&mut self) -> Option<&mut Frame>
pub fn frames(&self) -> impl Iterator<Item = &Frame> + '_
pub fn frame(&self, id: &FrameId) -> Option<&Frame>
Sourcepub fn on_http_request_finished(&mut self, request: HttpRequest)
pub fn on_http_request_finished(&mut self, request: HttpRequest)
Track the request in the frame
pub fn poll(&mut self, now: Instant) -> Option<FrameEvent>
Sourcepub fn goto(&mut self, req: FrameRequestedNavigation)
pub fn goto(&mut self, req: FrameRequestedNavigation)
Entrypoint for page navigation
Navigate a specific frame
Sourcepub fn on_attached_to_target(&mut self, _event: &EventAttachedToTarget)
pub fn on_attached_to_target(&mut self, _event: &EventAttachedToTarget)
Fired when a frame moved to another session
pub fn on_frame_tree(&mut self, frame_tree: FrameTree)
pub fn on_frame_attached( &mut self, frame_id: FrameId, parent_frame_id: Option<FrameId>, )
pub fn on_frame_detached(&mut self, event: &EventFrameDetached)
pub fn on_frame_stopped_loading(&mut self, event: &EventFrameStoppedLoading)
Sourcepub fn on_frame_started_loading(&mut self, event: &EventFrameStartedLoading)
pub fn on_frame_started_loading(&mut self, event: &EventFrameStartedLoading)
Fired when frame has started loading.
Sourcepub fn on_runtime_binding_called(&mut self, _ev: &EventBindingCalled)
pub fn on_runtime_binding_called(&mut self, _ev: &EventBindingCalled)
Notification is issued every time when binding is called
Sourcepub fn on_frame_execution_context_created(
&mut self,
event: &EventExecutionContextCreated,
)
pub fn on_frame_execution_context_created( &mut self, event: &EventExecutionContextCreated, )
Issued when new execution context is created
Sourcepub fn on_frame_execution_context_destroyed(
&mut self,
event: &EventExecutionContextDestroyed,
)
pub fn on_frame_execution_context_destroyed( &mut self, event: &EventExecutionContextDestroyed, )
Issued when execution context is destroyed
Sourcepub fn on_execution_contexts_cleared(&mut self)
pub fn on_execution_contexts_cleared(&mut self)
Issued when all executionContexts were cleared
Sourcepub fn on_page_lifecycle_event(&mut self, event: &EventLifecycleEvent)
pub fn on_page_lifecycle_event(&mut self, event: &EventLifecycleEvent)
Fired for top level page lifecycle events (nav, load, paint, etc.)
pub fn ensure_isolated_world( &mut self, world_name: &str, ) -> Option<CommandChain>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameManager
impl RefUnwindSafe for FrameManager
impl Send for FrameManager
impl Sync for FrameManager
impl Unpin for FrameManager
impl UnwindSafe for FrameManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more