pub enum EmbedderMsg {
Show 41 variants
Status(WebViewId, Option<String>),
ChangePageTitle(WebViewId, Option<String>),
MoveTo(WebViewId, Point2D<i32, DevicePixel>),
ResizeTo(WebViewId, Size2D<i32, DevicePixel>),
ShowSimpleDialog(WebViewId, SimpleDialog),
RequestAuthentication(WebViewId, ServoUrl, bool, GenericSender<Option<AuthenticationResponse>>),
ShowContextMenu(WebViewId, GenericSender<ContextMenuResult>, Option<String>, Vec<String>),
AllowNavigationRequest(WebViewId, NamespaceIndex<PipelineIndex>, ServoUrl),
AllowOpeningWebView(WebViewId, GenericSender<Option<(WebViewId, ViewportDetails)>>),
WebViewClosed(WebViewId),
WebViewFocused(WebViewId, bool),
WebViewBlurred,
AllowUnload(WebViewId, GenericSender<AllowOrDeny>),
ClearClipboard(WebViewId),
GetClipboardText(WebViewId, IpcSender<Result<String, String>>),
SetClipboardText(WebViewId, String),
SetCursor(WebViewId, Cursor),
NewFavicon(WebViewId, Image),
HistoryChanged(WebViewId, Vec<ServoUrl>, usize),
HistoryTraversalComplete(WebViewId, TraversalId),
GetWindowRect(WebViewId, GenericSender<Box2D<i32, DeviceIndependentPixel>>),
GetScreenMetrics(WebViewId, GenericSender<ScreenMetrics>),
NotifyFullscreenStateChanged(WebViewId, bool),
NotifyLoadStatusChanged(WebViewId, LoadStatus),
WebResourceRequested(Option<WebViewId>, WebResourceRequest, GenericSender<WebResourceResponseMsg>),
Panic(WebViewId, String, Option<String>),
GetSelectedBluetoothDevice(WebViewId, Vec<String>, GenericSender<Option<String>>),
SelectFiles(EmbedderControlId, FilePickerRequest, GenericSender<Option<Vec<PathBuf>>>),
PromptPermission(WebViewId, PermissionFeature, GenericSender<AllowOrDeny>),
ReportProfile(Vec<u8>),
MediaSessionEvent(WebViewId, MediaSessionEvent),
OnDevtoolsStarted(Result<u16, ()>, String),
RequestDevtoolsConnection(GenericSender<AllowOrDeny>),
PlayGamepadHapticEffect(WebViewId, usize, GamepadHapticEffectType, IpcSender<bool>),
StopGamepadHapticEffect(WebViewId, usize, IpcSender<bool>),
ShutdownComplete,
ShowNotification(Option<WebViewId>, Notification),
ShowEmbedderControl(EmbedderControlId, Box2D<i32, DevicePixel>, EmbedderControlRequest),
HideEmbedderControl(EmbedderControlId),
FinishJavaScriptEvaluation(JavaScriptEvaluationId, Result<JSValue, JavaScriptEvaluationError>),
InputEventHandled(WebViewId, InputEventId, InputEventResult),
}Variants§
Status(WebViewId, Option<String>)
A status message to be displayed by the browser chrome.
ChangePageTitle(WebViewId, Option<String>)
Alerts the embedder that the current page has changed its title.
MoveTo(WebViewId, Point2D<i32, DevicePixel>)
Move the window to a point
ResizeTo(WebViewId, Size2D<i32, DevicePixel>)
Resize the window to size
ShowSimpleDialog(WebViewId, SimpleDialog)
Show the user a simple dialog (alert(), confirm(),
or prompt()). Since their messages are controlled by web content, they should be presented to the user in a
way that makes them impossible to mistake for browser UI.
RequestAuthentication(WebViewId, ServoUrl, bool, GenericSender<Option<AuthenticationResponse>>)
Request authentication for a load or navigation from the embedder.
ShowContextMenu(WebViewId, GenericSender<ContextMenuResult>, Option<String>, Vec<String>)
Show a context menu to the user
Whether or not to allow a pipeline to load a url.
AllowOpeningWebView(WebViewId, GenericSender<Option<(WebViewId, ViewportDetails)>>)
Whether or not to allow script to open a new tab/browser
WebViewClosed(WebViewId)
A webview was destroyed.
WebViewFocused(WebViewId, bool)
A webview potentially gained focus for keyboard events. If the boolean value is false, the webiew could not be focused.
WebViewBlurred
All webviews lost focus for keyboard events.
AllowUnload(WebViewId, GenericSender<AllowOrDeny>)
Wether or not to unload a document
ClearClipboard(WebViewId)
Inform embedder to clear the clipboard
GetClipboardText(WebViewId, IpcSender<Result<String, String>>)
Gets system clipboard contents
SetClipboardText(WebViewId, String)
Sets system clipboard contents
SetCursor(WebViewId, Cursor)
Changes the cursor.
NewFavicon(WebViewId, Image)
A favicon was detected
HistoryChanged(WebViewId, Vec<ServoUrl>, usize)
The history state has changed.
HistoryTraversalComplete(WebViewId, TraversalId)
A history traversal operation completed.
GetWindowRect(WebViewId, GenericSender<Box2D<i32, DeviceIndependentPixel>>)
Get the device independent window rectangle.
GetScreenMetrics(WebViewId, GenericSender<ScreenMetrics>)
Get the device independent screen size and available size.
NotifyFullscreenStateChanged(WebViewId, bool)
Entered or exited fullscreen.
NotifyLoadStatusChanged(WebViewId, LoadStatus)
The LoadStatus of the Given WebView has changed.
WebResourceRequested(Option<WebViewId>, WebResourceRequest, GenericSender<WebResourceResponseMsg>)
Panic(WebViewId, String, Option<String>)
A pipeline panicked. First string is the reason, second one is the backtrace.
GetSelectedBluetoothDevice(WebViewId, Vec<String>, GenericSender<Option<String>>)
Open dialog to select bluetooth device.
SelectFiles(EmbedderControlId, FilePickerRequest, GenericSender<Option<Vec<PathBuf>>>)
Open file dialog to select files. Set boolean flag to true allows to select multiple files.
PromptPermission(WebViewId, PermissionFeature, GenericSender<AllowOrDeny>)
Open interface to request permission specified by prompt.
ReportProfile(Vec<u8>)
Report a complete sampled profile
MediaSessionEvent(WebViewId, MediaSessionEvent)
Notifies the embedder about media session events (i.e. when there is metadata for the active media session, playback state changes…).
OnDevtoolsStarted(Result<u16, ()>, String)
Report the status of Devtools Server with a token that can be used to bypass the permission prompt.
RequestDevtoolsConnection(GenericSender<AllowOrDeny>)
Ask the user to allow a devtools client to connect.
PlayGamepadHapticEffect(WebViewId, usize, GamepadHapticEffectType, IpcSender<bool>)
Request to play a haptic effect on a connected gamepad.
StopGamepadHapticEffect(WebViewId, usize, IpcSender<bool>)
Request to stop a haptic effect on a connected gamepad.
ShutdownComplete
Informs the embedder that the constellation has completed shutdown. Required because the constellation can have pending calls to make (e.g. SetFrameTree) at the time that we send it an ExitMsg.
ShowNotification(Option<WebViewId>, Notification)
Request to display a notification.
ShowEmbedderControl(EmbedderControlId, Box2D<i32, DevicePixel>, EmbedderControlRequest)
Request to display a form control to the embedder.
HideEmbedderControl(EmbedderControlId)
Request to display a form control to the embedder.
FinishJavaScriptEvaluation(JavaScriptEvaluationId, Result<JSValue, JavaScriptEvaluationError>)
Inform the embedding layer that a JavaScript evaluation has finished with the given result.
InputEventHandled(WebViewId, InputEventId, InputEventResult)
Inform the embedding layer that a particular InputEvent was handled by Servo
and the embedder can continue processing it, if necessary.
Trait Implementations§
Source§impl Debug for EmbedderMsg
impl Debug for EmbedderMsg
Source§impl<'de> Deserialize<'de> for EmbedderMsg
impl<'de> Deserialize<'de> for EmbedderMsg
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EmbedderMsg, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EmbedderMsg, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl<'_derivative_strum> From<&'_derivative_strum EmbedderMsg> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum EmbedderMsg> for &'static str
Source§fn from(x: &'_derivative_strum EmbedderMsg) -> &'static str
fn from(x: &'_derivative_strum EmbedderMsg) -> &'static str
Source§impl From<EmbedderMsg> for &'static str
impl From<EmbedderMsg> for &'static str
Source§fn from(x: EmbedderMsg) -> &'static str
fn from(x: EmbedderMsg) -> &'static str
Source§impl Serialize for EmbedderMsg
impl Serialize for EmbedderMsg
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for EmbedderMsg
impl RefUnwindSafe for EmbedderMsg
impl Send for EmbedderMsg
impl Sync for EmbedderMsg
impl Unpin for EmbedderMsg
impl UnwindSafe for EmbedderMsg
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
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>
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>
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>
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