allow for a service worker manager per origin

This commit is contained in:
Gregory Terzian 2020-04-01 23:33:27 +08:00
parent 9972aee81f
commit db217d5575
11 changed files with 405 additions and 245 deletions

View file

@ -706,6 +706,13 @@ pub trait ScriptThreadFactory {
) -> (Sender<Self::Message>, Receiver<Self::Message>);
}
/// This trait allows creating a `ServiceWorkerManager` without depending on the `script`
/// crate.
pub trait ServiceWorkerManagerFactory {
/// Create a `ServiceWorkerManager`.
fn create(sw_senders: SWManagerSenders, origin: ImmutableOrigin);
}
/// Whether the sandbox attribute is present for an iframe element
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub enum IFrameSandboxState {