pub enum EmbedderMsg {
Show 37 variants
Status(TopLevelBrowsingContextId, Option<String>),
ChangePageTitle(TopLevelBrowsingContextId, Option<String>),
MoveTo(TopLevelBrowsingContextId, Point2D<i32, DevicePixel>),
ResizeTo(TopLevelBrowsingContextId, Size2D<i32, DevicePixel>),
Prompt(TopLevelBrowsingContextId, PromptDefinition, PromptOrigin),
RequestAuthentication(TopLevelBrowsingContextId, ServoUrl, bool, IpcSender<Option<AuthenticationResponse>>),
ShowContextMenu(TopLevelBrowsingContextId, IpcSender<ContextMenuResult>, Option<String>, Vec<String>),
AllowNavigationRequest(TopLevelBrowsingContextId, PipelineId, ServoUrl),
AllowOpeningWebView(TopLevelBrowsingContextId, IpcSender<Option<TopLevelBrowsingContextId>>),
WebViewOpened(TopLevelBrowsingContextId),
WebViewClosed(TopLevelBrowsingContextId),
WebViewFocused(TopLevelBrowsingContextId),
WebViewBlurred,
AllowUnload(TopLevelBrowsingContextId, IpcSender<AllowOrDeny>),
Keyboard(TopLevelBrowsingContextId, KeyboardEvent),
ClearClipboard(TopLevelBrowsingContextId),
GetClipboardText(TopLevelBrowsingContextId, IpcSender<Result<String, String>>),
SetClipboardText(TopLevelBrowsingContextId, String),
SetCursor(TopLevelBrowsingContextId, Cursor),
NewFavicon(TopLevelBrowsingContextId, ServoUrl),
HistoryChanged(TopLevelBrowsingContextId, Vec<ServoUrl>, usize),
SetFullscreenState(TopLevelBrowsingContextId, bool),
NotifyLoadStatusChanged(TopLevelBrowsingContextId, LoadStatus),
WebResourceRequested(Option<TopLevelBrowsingContextId>, WebResourceRequest, IpcSender<WebResourceResponseMsg>),
Panic(TopLevelBrowsingContextId, String, Option<String>),
GetSelectedBluetoothDevice(TopLevelBrowsingContextId, Vec<String>, IpcSender<Option<String>>),
SelectFiles(TopLevelBrowsingContextId, Vec<FilterPattern>, bool, IpcSender<Option<Vec<PathBuf>>>),
PromptPermission(TopLevelBrowsingContextId, PermissionFeature, IpcSender<AllowOrDeny>),
ShowIME(TopLevelBrowsingContextId, InputMethodType, Option<(String, i32)>, bool, Box2D<i32, DevicePixel>),
HideIME(TopLevelBrowsingContextId),
ReportProfile(Vec<u8>),
MediaSessionEvent(TopLevelBrowsingContextId, MediaSessionEvent),
OnDevtoolsStarted(Result<u16, ()>, String),
RequestDevtoolsConnection(IpcSender<AllowOrDeny>),
EventDelivered(TopLevelBrowsingContextId, CompositorEventVariant),
PlayGamepadHapticEffect(TopLevelBrowsingContextId, usize, GamepadHapticEffectType, IpcSender<bool>),
StopGamepadHapticEffect(TopLevelBrowsingContextId, usize, IpcSender<bool>),
}
Variants§
Status(TopLevelBrowsingContextId, Option<String>)
A status message to be displayed by the browser chrome.
ChangePageTitle(TopLevelBrowsingContextId, Option<String>)
Alerts the embedder that the current page has changed its title.
MoveTo(TopLevelBrowsingContextId, Point2D<i32, DevicePixel>)
Move the window to a point
ResizeTo(TopLevelBrowsingContextId, Size2D<i32, DevicePixel>)
Resize the window to size
Prompt(TopLevelBrowsingContextId, PromptDefinition, PromptOrigin)
Show dialog to user
RequestAuthentication(TopLevelBrowsingContextId, ServoUrl, bool, IpcSender<Option<AuthenticationResponse>>)
Request authentication for a load or navigation from the embedder.
ShowContextMenu(TopLevelBrowsingContextId, IpcSender<ContextMenuResult>, Option<String>, Vec<String>)
Show a context menu to the user
Whether or not to allow a pipeline to load a url.
AllowOpeningWebView(TopLevelBrowsingContextId, IpcSender<Option<TopLevelBrowsingContextId>>)
Whether or not to allow script to open a new tab/browser
WebViewOpened(TopLevelBrowsingContextId)
A webview was created.
WebViewClosed(TopLevelBrowsingContextId)
A webview was destroyed.
WebViewFocused(TopLevelBrowsingContextId)
A webview gained focus for keyboard events.
WebViewBlurred
All webviews lost focus for keyboard events.
AllowUnload(TopLevelBrowsingContextId, IpcSender<AllowOrDeny>)
Wether or not to unload a document
Keyboard(TopLevelBrowsingContextId, KeyboardEvent)
Sends an unconsumed key event back to the embedder.
ClearClipboard(TopLevelBrowsingContextId)
Inform embedder to clear the clipboard
GetClipboardText(TopLevelBrowsingContextId, IpcSender<Result<String, String>>)
Gets system clipboard contents
SetClipboardText(TopLevelBrowsingContextId, String)
Sets system clipboard contents
SetCursor(TopLevelBrowsingContextId, Cursor)
Changes the cursor.
NewFavicon(TopLevelBrowsingContextId, ServoUrl)
A favicon was detected
HistoryChanged(TopLevelBrowsingContextId, Vec<ServoUrl>, usize)
The history state has changed.
SetFullscreenState(TopLevelBrowsingContextId, bool)
Enter or exit fullscreen
NotifyLoadStatusChanged(TopLevelBrowsingContextId, LoadStatus)
The LoadStatus
of the Given WebView
has changed.
WebResourceRequested(Option<TopLevelBrowsingContextId>, WebResourceRequest, IpcSender<WebResourceResponseMsg>)
Panic(TopLevelBrowsingContextId, String, Option<String>)
A pipeline panicked. First string is the reason, second one is the backtrace.
GetSelectedBluetoothDevice(TopLevelBrowsingContextId, Vec<String>, IpcSender<Option<String>>)
Open dialog to select bluetooth device.
SelectFiles(TopLevelBrowsingContextId, Vec<FilterPattern>, bool, IpcSender<Option<Vec<PathBuf>>>)
Open file dialog to select files. Set boolean flag to true allows to select multiple files.
PromptPermission(TopLevelBrowsingContextId, PermissionFeature, IpcSender<AllowOrDeny>)
Open interface to request permission specified by prompt.
ShowIME(TopLevelBrowsingContextId, InputMethodType, Option<(String, i32)>, bool, Box2D<i32, DevicePixel>)
Request to present an IME to the user when an editable element is focused. If the input is text, the second parameter defines the pre-existing string text content and the zero-based index into the string locating the insertion point. bool is true for multi-line and false otherwise.
HideIME(TopLevelBrowsingContextId)
Request to hide the IME when the editable element is blurred.
ReportProfile(Vec<u8>)
Report a complete sampled profile
MediaSessionEvent(TopLevelBrowsingContextId, 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(IpcSender<AllowOrDeny>)
Ask the user to allow a devtools client to connect.
EventDelivered(TopLevelBrowsingContextId, CompositorEventVariant)
The given event was delivered to a pipeline in the given browser.
PlayGamepadHapticEffect(TopLevelBrowsingContextId, usize, GamepadHapticEffectType, IpcSender<bool>)
Request to play a haptic effect on a connected gamepad.
StopGamepadHapticEffect(TopLevelBrowsingContextId, usize, IpcSender<bool>)
Request to stop a haptic effect on a connected gamepad.
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 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