diff options
author | Gregory Terzian <gterzian@users.noreply.github.com> | 2020-04-01 23:33:27 +0800 |
---|---|---|
committer | Gregory Terzian <gterzian@users.noreply.github.com> | 2020-04-05 22:43:40 +0800 |
commit | db217d557513030836898f840206d5ac9ed87b79 (patch) | |
tree | b7a6fcb19ad54f6a2304bd7ce2049beda8ee85f6 /components/script_traits/script_msg.rs | |
parent | 9972aee81f0e80d34157325a5e13b3b1a7ef417a (diff) | |
download | servo-db217d557513030836898f840206d5ac9ed87b79.tar.gz servo-db217d557513030836898f840206d5ac9ed87b79.zip |
allow for a service worker manager per origin
Diffstat (limited to 'components/script_traits/script_msg.rs')
-rw-r--r-- | components/script_traits/script_msg.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index 918b4f4ff78..245a02ec6d2 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -370,11 +370,16 @@ pub struct DOMMessage { } /// Channels to allow service worker manager to communicate with constellation and resource thread +#[derive(Deserialize, Serialize)] pub struct SWManagerSenders { - /// sender for communicating with constellation + /// Sender of messages to the constellation. pub swmanager_sender: IpcSender<SWManagerMsg>, - /// sender for communicating with resource thread + /// Sender for communicating with resource thread. pub resource_sender: IpcSender<CoreResourceMsg>, + /// Sender of messages to the manager. + pub own_sender: IpcSender<ServiceWorkerMsg>, + /// Receiver of messages from the constellation. + pub receiver: IpcReceiver<ServiceWorkerMsg>, } /// Messages sent to Service Worker Manager thread @@ -393,6 +398,8 @@ pub enum ServiceWorkerMsg { /// Messages outgoing from the Service Worker Manager thread to constellation #[derive(Debug, Deserialize, Serialize)] pub enum SWManagerMsg { - /// Provide the constellation with a means of communicating with the Service Worker Manager - OwnSender(IpcSender<ServiceWorkerMsg>), + /// Placeholder to keep the enum, + /// as it will be needed when implementing + /// https://github.com/servo/servo/issues/24660 + PostMessageToClient, } |