mirror of
https://github.com/servo/servo.git
synced 2025-07-28 17:50:37 +01:00
Add thaw/freeze messages that can suspend/resume webcontent timers #4907
This commit is contained in:
parent
dc31d96f65
commit
c2961c94b4
6 changed files with 105 additions and 9 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue