aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 2bd7cc4907b..1c1a7bd9538 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -139,7 +139,7 @@ use script_traits::{
DiscardBrowsingContext, DocumentActivity, EventResult, HistoryEntryReplacement,
};
use script_traits::{InitialScriptState, JsEvalResult, LayoutMsg, LoadData, LoadOrigin};
-use script_traits::{MouseButton, MouseEventType, NewLayoutInfo};
+use script_traits::{MediaSessionActionType, MouseButton, MouseEventType, NewLayoutInfo};
use script_traits::{Painter, ProgressiveWebMetricType, ScriptMsg, ScriptThreadFactory};
use script_traits::{ScriptToConstellationChan, TimerEvent, TimerSchedulerMsg};
use script_traits::{TimerSource, TouchEventType, TouchId, UntrustedNodeAddress, WheelDelta};
@@ -1720,6 +1720,7 @@ impl ScriptThread {
WebVREvents(id, ..) => Some(id),
PaintMetric(..) => None,
ExitFullScreen(id, ..) => Some(id),
+ MediaSessionAction(..) => None,
}
},
MixedMessage::FromDevtools(_) => None,
@@ -1949,6 +1950,9 @@ impl ScriptThread {
ConstellationControlMsg::PaintMetric(pipeline_id, metric_type, metric_value) => {
self.handle_paint_metric(pipeline_id, metric_type, metric_value)
},
+ ConstellationControlMsg::MediaSessionAction(browsing_context_id, action) => {
+ self.handle_media_session_action(browsing_context_id, action)
+ },
msg @ ConstellationControlMsg::AttachLayout(..) |
msg @ ConstellationControlMsg::Viewport(..) |
msg @ ConstellationControlMsg::SetScrollState(..) |
@@ -3932,6 +3936,14 @@ impl ScriptThread {
}
}
+ fn handle_media_session_action(
+ &self,
+ browsing_context_id: TopLevelBrowsingContextId,
+ action: MediaSessionActionType,
+ ) {
+ // TODO
+ }
+
pub fn enqueue_microtask(job: Microtask) {
SCRIPT_THREAD_ROOT.with(|root| {
let script_thread = unsafe { &*root.get().unwrap() };