Make service workers talk to their serviceworkerglobalscopes

This commit is contained in:
Rahul Sharma 2016-07-28 23:34:44 +05:30
parent 72279cc7eb
commit 0996b38ade
13 changed files with 184 additions and 46 deletions

View file

@ -738,6 +738,12 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
// store service worker manager for communicating with it.
self.swmanager_chan = Some(sw_sender);
}
SWManagerMsg::ConnectServiceWorker(scope_url, pipeline_id, msg_chan) => {
if let Some(ref parent_info) = self.pipelines.get(&pipeline_id) {
let from_cons_msg = ConstellationControlMsg::ConnectServiceWorker(scope_url, msg_chan);
let _ = parent_info.script_chan.send(from_cons_msg);
}
}
}
}