aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/script_msg.rs
diff options
context:
space:
mode:
authorRahul Sharma <rsconceptx@gmail.com>2016-07-28 23:34:44 +0530
committerRahul Sharma <rsconceptx@gmail.com>2016-09-07 12:07:36 +0530
commit0996b38ade7e2fe368ad7bd21ba8cf9a48d8f866 (patch)
tree8ac690564d216b672e1da26404e8c6d5585dcbc3 /components/script_traits/script_msg.rs
parent72279cc7eb044a760ce461d76da2ff62adc511dc (diff)
downloadservo-0996b38ade7e2fe368ad7bd21ba8cf9a48d8f866.tar.gz
servo-0996b38ade7e2fe368ad7bd21ba8cf9a48d8f866.zip
Make service workers talk to their serviceworkerglobalscopes
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>)
+
}