Add thaw/freeze messages that can suspend/resume webcontent timers #4907

This commit is contained in:
Pawel Kondzior 2015-02-19 11:20:55 +07:00
parent dc31d96f65
commit c2961c94b4
6 changed files with 105 additions and 9 deletions

View file

@ -191,6 +191,16 @@ impl Pipeline {
}
pub fn freeze(&self) {
let ScriptControlChan(ref script_channel) = self.script_chan;
let _ = script_channel.send(ConstellationControlMsg::Freeze(self.id)).unwrap();
}
pub fn thaw(&self) {
let ScriptControlChan(ref script_channel) = self.script_chan;
let _ = script_channel.send(ConstellationControlMsg::Thaw(self.id)).unwrap();
}
pub fn force_exit(&self) {
let ScriptControlChan(ref script_channel) = self.script_chan;
let _ = script_channel.send(