aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/script_msg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script_traits/script_msg.rs')
-rw-r--r--components/script_traits/script_msg.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs
index d183336f6f8..b1a9f2e6a52 100644
--- a/components/script_traits/script_msg.rs
+++ b/components/script_traits/script_msg.rs
@@ -158,6 +158,10 @@ pub struct ScopeThings {
pub worker_id: WorkerId,
}
+/// Message that gets passed to service worker scope on postMessage
+#[derive(Deserialize, Serialize, Debug)]
+pub struct DOMMessage(pub Vec<u64>);
+
/// Channels to allow service worker manager to communicate with constellation and resource thread
pub struct SWManagerSenders {
/// sender for communicating with constellation
@@ -182,4 +186,7 @@ pub enum ServiceWorkerMsg {
pub enum SWManagerMsg {
/// Provide the constellation with a means of communicating with the Service Worker Manager
OwnSender(IpcSender<ServiceWorkerMsg>),
+ /// Message to ask to get a Trusted<ServiceWorker> to constellation
+ ConnectServiceWorker(Url, PipelineId, IpcSender<DOMMessage>)
+
}