pub(crate) struct DefaultWebViewDelegate;Trait Implementations§
Source§impl WebViewDelegate for DefaultWebViewDelegate
impl WebViewDelegate for DefaultWebViewDelegate
Source§fn screen_geometry(&self, _webview: WebView) -> Option<ScreenGeometry>
fn screen_geometry(&self, _webview: WebView) -> Option<ScreenGeometry>
Get the
ScreenGeometry for this WebView. If this is unimplemented or returns None
the screen will have the size of the WebView’s RenderingContext and WebView will be
considered to be positioned at the screen’s origin.Source§fn notify_url_changed(&self, _webview: WebView, _url: Url)
fn notify_url_changed(&self, _webview: WebView, _url: Url)
The URL of the currently loaded page in this
WebView has changed. The new
URL can accessed via WebView::url.Source§fn notify_page_title_changed(&self, _webview: WebView, _title: Option<String>)
fn notify_page_title_changed(&self, _webview: WebView, _title: Option<String>)
The page title of the currently loaded page in this
WebView has changed. The new
title can accessed via WebView::page_title.Source§fn notify_status_text_changed(&self, _webview: WebView, _status: Option<String>)
fn notify_status_text_changed(&self, _webview: WebView, _status: Option<String>)
The status text of the currently loaded page in this
WebView has changed. The new
status text can accessed via WebView::status_text.Source§fn notify_focus_changed(&self, _webview: WebView, _focused: bool)
fn notify_focus_changed(&self, _webview: WebView, _focused: bool)
This
WebView has either become focused or lost focus. Whether or not the
WebView is focused can be accessed via WebView::focused.Source§fn notify_animating_changed(&self, _webview: WebView, _animating: bool)
fn notify_animating_changed(&self, _webview: WebView, _animating: bool)
Source§fn notify_load_status_changed(&self, _webview: WebView, _status: LoadStatus)
fn notify_load_status_changed(&self, _webview: WebView, _status: LoadStatus)
The
LoadStatus of the currently loading or loaded page in this WebView has changed. The new
status can accessed via WebView::load_status.Source§fn notify_cursor_changed(&self, _webview: WebView, _: Cursor)
fn notify_cursor_changed(&self, _webview: WebView, _: Cursor)
The
Cursor of the currently loaded page in this WebView has changed. The new
cursor can accessed via WebView::cursor.Source§fn notify_favicon_changed(&self, _webview: WebView)
fn notify_favicon_changed(&self, _webview: WebView)
The favicon of the currently loaded page in this
WebView has changed. The new
favicon [Image] can accessed via WebView::favicon.Source§fn notify_new_frame_ready(&self, _webview: WebView)
fn notify_new_frame_ready(&self, _webview: WebView)
Notify the embedder that it needs to present a new frame.
Source§fn notify_history_changed(
&self,
_webview: WebView,
_entries: Vec<Url>,
_current: usize,
)
fn notify_history_changed( &self, _webview: WebView, _entries: Vec<Url>, _current: usize, )
The navigation history of this
WebView has changed. The navigation history is represented
as a Vec<Url> and _current denotes the current index in the history. New navigations,
back navigation, and forward navigation modify this index.Source§fn notify_traversal_complete(&self, _webview: WebView, _: TraversalId)
fn notify_traversal_complete(&self, _webview: WebView, _: TraversalId)
A history traversal operation is complete.
Source§fn notify_closed(&self, _webview: WebView)
fn notify_closed(&self, _webview: WebView)
Source§fn notify_input_event_handled(
&self,
_webview: WebView,
_: InputEventId,
_: InputEventResult,
)
fn notify_input_event_handled( &self, _webview: WebView, _: InputEventId, _: InputEventResult, )
An input event passed to this
WebView via WebView::notify_input_event has been handled
by Servo. This allows post-procesing of input events, such as chaining up unhandled events
to parent UI elements.Source§fn notify_crashed(
&self,
_webview: WebView,
_reason: String,
_backtrace: Option<String>,
)
fn notify_crashed( &self, _webview: WebView, _reason: String, _backtrace: Option<String>, )
A pipeline in the webview panicked. First string is the reason, second one is the backtrace.
Source§fn notify_media_session_event(
&self,
_webview: WebView,
_event: MediaSessionEvent,
)
fn notify_media_session_event( &self, _webview: WebView, _event: MediaSessionEvent, )
Notifies the embedder about media session events
(i.e. when there is metadata for the active media session, playback state changes…).
Source§fn notify_fullscreen_state_changed(&self, _webview: WebView, _: bool)
fn notify_fullscreen_state_changed(&self, _webview: WebView, _: bool)
A notification that the
WebView has entered or exited fullscreen mode. This is an
opportunity for the embedder to transition the containing window into or out of fullscreen
mode and to show or hide extra UI elements. Regardless of how the notification is handled,
the page will enter or leave fullscreen state internally according to the Fullscreen
API.Whether or not to allow a
WebView to load a URL in its main frame or one of its
nested <iframe>s. NavigationRequests are accepted by default.Source§fn request_unload(&self, _webview: WebView, _unload_request: AllowOrDenyRequest)
fn request_unload(&self, _webview: WebView, _unload_request: AllowOrDenyRequest)
Whether or not to allow a
WebView to unload a Document in its main frame or one
of its nested <iframe>s. By default, unloads are allowed.Source§fn request_move_to(&self, _webview: WebView, _: DeviceIntPoint)
fn request_move_to(&self, _webview: WebView, _: DeviceIntPoint)
Move the window to a point.
Source§fn request_resize_to(
&self,
_webview: WebView,
_requested_outer_size: DeviceIntSize,
)
fn request_resize_to( &self, _webview: WebView, _requested_outer_size: DeviceIntSize, )
Try to resize the window that contains this
WebView to the provided outer
size. These resize requests can come from page content. Servo will ensure that the
values are greater than zero, but it is up to the embedder to limit the maximum
size. For instance, a reasonable limitation might be that the final size is no
larger than the screen size.Source§fn request_open_auxiliary_webview(
&self,
_parent_webview: WebView,
) -> Option<WebView>
fn request_open_auxiliary_webview( &self, _parent_webview: WebView, ) -> Option<WebView>
Whether or not to allow script to open a new
WebView. If not handled by the
embedder, these requests are automatically denied.Source§fn request_permission(&self, _webview: WebView, _: PermissionRequest)
fn request_permission(&self, _webview: WebView, _: PermissionRequest)
Content in a
WebView is requesting permission to access a feature requiring
permission from the user. The embedder should allow or deny the request, either by
reading a cached value or querying the user for permission via the user interface.fn request_authentication( &self, _webview: WebView, _authentication_request: AuthenticationRequest, )
Show a context menu to the user
Source§fn show_bluetooth_device_dialog(
&self,
_webview: WebView,
_: Vec<String>,
response_sender: GenericSender<Option<String>>,
)
fn show_bluetooth_device_dialog( &self, _webview: WebView, _: Vec<String>, response_sender: GenericSender<Option<String>>, )
Open dialog to select bluetooth device.
TODO: This API needs to be reworked to match the new model of how responses are sent.
Source§fn show_embedder_control(
&self,
_webview: WebView,
embedder_control: EmbedderControl,
)
fn show_embedder_control( &self, _webview: WebView, embedder_control: EmbedderControl, )
Request that the embedder show UI elements for form controls that are not integrated
into page content, such as dropdowns for
<select> elements.Source§fn hide_embedder_control(
&self,
_webview: WebView,
_control_id: EmbedderControlId,
)
fn hide_embedder_control( &self, _webview: WebView, _control_id: EmbedderControlId, )
Request that the embedder hide and ignore a previous
EmbedderControl request, if it hasn’t
already responded to it. Read moreSource§fn play_gamepad_haptic_effect(
&self,
_webview: WebView,
_: usize,
_: GamepadHapticEffectType,
_: IpcSender<bool>,
)
fn play_gamepad_haptic_effect( &self, _webview: WebView, _: usize, _: GamepadHapticEffectType, _: IpcSender<bool>, )
Request to play a haptic effect on a connected gamepad.
Source§fn stop_gamepad_haptic_effect(
&self,
_webview: WebView,
_: usize,
_: IpcSender<bool>,
)
fn stop_gamepad_haptic_effect( &self, _webview: WebView, _: usize, _: IpcSender<bool>, )
Request to stop a haptic effect on a connected gamepad.
Source§fn load_web_resource(&self, _webview: WebView, _load: WebResourceLoad)
fn load_web_resource(&self, _webview: WebView, _load: WebResourceLoad)
Triggered when this
WebView will load a web (HTTP/HTTPS) resource. The load may be
intercepted and alternate contents can be loaded by the client by calling
WebResourceLoad::intercept. If not handled, the load will continue as normal. Read moreSource§fn show_notification(&self, _webview: WebView, _notification: Notification)
fn show_notification(&self, _webview: WebView, _notification: Notification)
Request to display a notification.
Auto Trait Implementations§
impl Freeze for DefaultWebViewDelegate
impl RefUnwindSafe for DefaultWebViewDelegate
impl Send for DefaultWebViewDelegate
impl Sync for DefaultWebViewDelegate
impl Unpin for DefaultWebViewDelegate
impl UnwindSafe for DefaultWebViewDelegate
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> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. 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