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

@ -71,7 +71,7 @@ use util::ipc::OptionalOpaqueIpcSender;
use webdriver_msg::{LoadStatus, WebDriverScriptCommand};
pub use script_msg::{LayoutMsg, ScriptMsg, EventResult, LogEntry};
pub use script_msg::{ServiceWorkerMsg, ScopeThings, SWManagerMsg, SWManagerSenders};
pub use script_msg::{ServiceWorkerMsg, ScopeThings, SWManagerMsg, SWManagerSenders, DOMMessage};
/// The address of a node. Layout sends these back. They must be validated via
/// `from_untrusted_node_address` before they can be used, because we do not trust layout.
@ -208,6 +208,8 @@ pub enum ConstellationControlMsg {
ReportCSSError(PipelineId, String, usize, usize, String),
/// Reload the given page.
Reload(PipelineId),
/// Requests the script thread to connect service worker object to its scope
ConnectServiceWorker(Url, IpcSender<DOMMessage>)
}
impl fmt::Debug for ConstellationControlMsg {
@ -237,6 +239,7 @@ impl fmt::Debug for ConstellationControlMsg {
FramedContentChanged(..) => "FramedContentChanged",
ReportCSSError(..) => "ReportCSSError",
Reload(..) => "Reload",
ConnectServiceWorker(..) => "ConnectServiceWorker"
})
}
}