pub(crate) struct Handler {
pub(crate) load_status_receiver: Receiver<LoadStatus>,
pub(crate) load_status_sender: IpcSender<LoadStatus>,
pub(crate) session: Option<WebDriverSession>,
pub(crate) constellation_chan: Sender<ConstellationMsg>,
pub(crate) resize_timeout: u32,
}
Fields§
§load_status_receiver: Receiver<LoadStatus>
The threaded receiver on which we can block for a load-status. It will receive messages sent on the load_status_sender, and forwarded by the IPC router.
load_status_sender: IpcSender<LoadStatus>
The IPC sender which we can clone and pass along to the constellation, for it to send us a load-status. Messages sent on it will be forwarded to the load_status_receiver.
session: Option<WebDriverSession>
§constellation_chan: Sender<ConstellationMsg>
§resize_timeout: u32
Implementations§
source§impl Handler
impl Handler
pub(crate) fn dispatch_actions( &mut self, actions_by_tick: &[ActionSequence], ) -> Result<(), ErrorStatus>
fn dispatch_general_action(&mut self, source_id: &str)
fn dispatch_tick_actions( &mut self, tick_actions: &ActionSequence, tick_duration: u64, ) -> Result<(), ErrorStatus>
fn dispatch_keydown_action(&mut self, source_id: &str, action: &KeyDownAction)
fn dispatch_keyup_action(&mut self, source_id: &str, action: &KeyUpAction)
pub(crate) fn dispatch_pointerdown_action( &mut self, source_id: &str, action: &PointerDownAction, )
pub(crate) fn dispatch_pointerup_action( &mut self, source_id: &str, action: &PointerUpAction, )
pub(crate) fn dispatch_pointermove_action( &mut self, source_id: &str, action: &PointerMoveAction, tick_duration: u64, ) -> Result<(), ErrorStatus>
source§impl Handler
impl Handler
pub fn new(constellation_chan: Sender<ConstellationMsg>) -> Handler
pub(crate) fn focus_top_level_browsing_context_id( &self, ) -> WebDriverResult<TopLevelBrowsingContextId>
pub(crate) fn session(&self) -> WebDriverResult<&WebDriverSession>
pub(crate) fn session_mut(&mut self) -> WebDriverResult<&mut WebDriverSession>
pub(crate) fn handle_new_session( &mut self, parameters: &NewSessionParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_delete_session( &mut self, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_status(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn browsing_context_script_command( &self, cmd_msg: WebDriverScriptCommand, ) -> WebDriverResult<()>
pub(crate) fn top_level_script_command( &self, cmd_msg: WebDriverScriptCommand, ) -> WebDriverResult<()>
pub(crate) fn handle_get( &self, parameters: &GetParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn wait_for_load(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_current_url(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_window_size(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_set_window_size( &self, params: &WindowRectParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_is_enabled( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_is_selected( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_go_back(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_go_forward(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_refresh(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_title(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_window_handle(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_window_handles(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_find_element( &self, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_close_window( &mut self, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_new_window( &mut self, _parameters: &NewWindowParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_switch_to_frame( &mut self, parameters: &SwitchToFrameParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_switch_to_parent_frame( &mut self, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_switch_to_window( &mut self, parameters: &SwitchToWindowParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn switch_to_frame( &mut self, frame_id: WebDriverFrameId, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_find_elements( &self, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_find_element_element( &self, element: &WebElement, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_find_elements_from_element( &self, element: &WebElement, parameters: &LocatorParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_rect( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_text( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_active_element(&self) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_tag_name( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_attribute( &self, element: &WebElement, name: &str, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_property( &self, element: &WebElement, name: &str, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_css( &self, element: &WebElement, name: &str, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_dismiss_alert( &mut self, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_get_timeouts( &mut self, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_set_timeouts( &mut self, parameters: &TimeoutsParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_get_page_source( &self, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_perform_actions( &mut self, parameters: &ActionsParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_release_actions( &mut self, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_execute_script( &self, parameters: &JavascriptCommandParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_execute_async_script( &self, parameters: &JavascriptCommandParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn postprocess_js_result( &self, result: WebDriverJSResult, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_send_keys( &self, element: &WebElement, keys: &SendKeysParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_element_click( &mut self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn take_screenshot( &self, rect: Option<Rect<f32, CSSPixel>>, ) -> WebDriverResult<String>
pub(crate) fn handle_take_screenshot( &self, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_take_element_screenshot( &self, element: &WebElement, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_get_prefs( &self, parameters: &GetPrefsParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_set_prefs( &self, parameters: &SetPrefsParameters, ) -> WebDriverResult<WebDriverResponse>
pub(crate) fn handle_reset_prefs( &self, parameters: &GetPrefsParameters, ) -> WebDriverResult<WebDriverResponse>
Trait Implementations§
source§impl WebDriverHandler<ServoExtensionRoute> for Handler
impl WebDriverHandler<ServoExtensionRoute> for Handler
fn handle_command( &mut self, _session: &Option<Session>, msg: WebDriverMessage<ServoExtensionRoute>, ) -> WebDriverResult<WebDriverResponse>
fn teardown_session(&mut self, _session: SessionTeardownKind)
Auto Trait Implementations§
impl Freeze for Handler
impl !RefUnwindSafe for Handler
impl Send for Handler
impl !Sync for Handler
impl Unpin for Handler
impl UnwindSafe for Handler
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert