diff options
author | Martin Robinson <mrobinson@igalia.com> | 2025-04-04 21:39:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-04 19:39:38 +0000 |
commit | 5a35e1faec941b02291b33d10cd2f516e0464f01 (patch) | |
tree | e055335fd519e867079e3e6cfe9e2a620b182060 /components/script/dom/mediasession.rs | |
parent | c7a7862574b4fca62bed35d958f0f363f0b6ab3f (diff) | |
download | servo-5a35e1faec941b02291b33d10cd2f516e0464f01.tar.gz servo-5a35e1faec941b02291b33d10cd2f516e0464f01.zip |
constellation: Rename messages sent to the `Constellation` (#36341)
Messages that are sent to the `Constellation` have pretty ambiguous
names.
This change does two renames:
- `ConstellationMsg` → `EmbedderToConstellationMessage`
- `ScriptMsg` → `ScriptToConstellationMessage`
This naming reflects that the `Constellation` stands in between the
embedding layer and the script layer and can receive messages from both.
Soon both of these message types will live in `constellation_traits`,
reflecting the idea that the `_traits` variant for a crate is
responsible for exposing the API for that crate.
Testing: No new tests are necessary here as this just renames two enums.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/script/dom/mediasession.rs')
-rw-r--r-- | components/script/dom/mediasession.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/script/dom/mediasession.rs b/components/script/dom/mediasession.rs index fe5604daf85..f54335afb60 100644 --- a/components/script/dom/mediasession.rs +++ b/components/script/dom/mediasession.rs @@ -8,7 +8,7 @@ use dom_struct::dom_struct; use embedder_traits::{ MediaMetadata as EmbedderMediaMetadata, MediaSessionActionType, MediaSessionEvent, }; -use script_traits::ScriptMsg; +use script_traits::ScriptToConstellationMessage; use super::bindings::trace::HashMapTracedValues; use crate::conversions::Convert; @@ -106,7 +106,10 @@ impl MediaSession { let global = self.global(); let window = global.as_window(); let pipeline_id = window.pipeline_id(); - window.send_to_constellation(ScriptMsg::MediaSessionEvent(pipeline_id, event)); + window.send_to_constellation(ScriptToConstellationMessage::MediaSessionEvent( + pipeline_id, + event, + )); } pub(crate) fn update_title(&self, title: String) { |