aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorFernando Jiménez Moreno <ferjmoreno@gmail.com>2019-10-28 16:08:05 +0100
committerFernando Jiménez Moreno <ferjmoreno@gmail.com>2019-11-20 13:33:51 +0100
commit85ec66b43edea5c91ba9a77390867cb9b2db6baa (patch)
tree1a410c221a3e4543e33f5ec812b6c8fc006ac8ba /components/script/script_thread.rs
parent08f9f17ed36c1102db51eaa1a88e6914757f2026 (diff)
downloadservo-85ec66b43edea5c91ba9a77390867cb9b2db6baa.tar.gz
servo-85ec66b43edea5c91ba9a77390867cb9b2db6baa.zip
Move active media session logic to constellation
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index e7b39d26420..886977e1945 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -701,7 +701,7 @@ pub struct ScriptThread {
/// The MediaSessions known by this thread, if any.
/// There can only be one active MediaSession.
/// The constellation has the BrowsingContextId of the active MediaSession, if any.
- media_sessions: DomRefCell<HashMap<TopLevelBrowsingContextId, Dom<MediaSession>>>,
+ media_sessions: DomRefCell<HashMap<BrowsingContextId, Dom<MediaSession>>>,
}
/// In the event of thread panic, all data on the stack runs its destructor. However, there
@@ -3938,7 +3938,7 @@ impl ScriptThread {
fn handle_media_session_action(
&self,
- browsing_context_id: TopLevelBrowsingContextId,
+ browsing_context_id: BrowsingContextId,
action: MediaSessionActionType,
) {
match self.media_sessions.borrow().get(&browsing_context_id) {
@@ -3973,7 +3973,7 @@ impl ScriptThread {
pub fn register_media_session(
media_session: &MediaSession,
- browsing_context_id: TopLevelBrowsingContextId,
+ browsing_context_id: BrowsingContextId,
) {
SCRIPT_THREAD_ROOT.with(|root| {
let script_thread = unsafe { &*root.get().unwrap() };
@@ -3984,7 +3984,7 @@ impl ScriptThread {
})
}
- pub fn remove_media_session(browsing_context_id: TopLevelBrowsingContextId) {
+ pub fn remove_media_session(browsing_context_id: BrowsingContextId) {
SCRIPT_THREAD_ROOT.with(|root| {
let script_thread = unsafe { &*root.get().unwrap() };
script_thread
@@ -3995,7 +3995,7 @@ impl ScriptThread {
}
pub fn get_media_session(
- browsing_context_id: TopLevelBrowsingContextId,
+ browsing_context_id: BrowsingContextId,
) -> Option<DomRoot<MediaSession>> {
SCRIPT_THREAD_ROOT.with(|root| {
let script_thread = unsafe { &*root.get().unwrap() };