diff options
author | Pawel Kondzior <pawel@kondzior.com> | 2015-02-19 11:20:55 +0700 |
---|---|---|
committer | Pawel Kondzior <pawel@kondzior.com> | 2015-02-24 05:33:27 +0100 |
commit | c2961c94b49a401d647e3f10cf04cd74aa7287c8 (patch) | |
tree | 710a28fef8f76006e6978ab37ee7521774fd487d /components/compositing/pipeline.rs | |
parent | dc31d96f65246def19cb7a23f3a62795cd7344a1 (diff) | |
download | servo-c2961c94b49a401d647e3f10cf04cd74aa7287c8.tar.gz servo-c2961c94b49a401d647e3f10cf04cd74aa7287c8.zip |
Add thaw/freeze messages that can suspend/resume webcontent timers #4907
Diffstat (limited to 'components/compositing/pipeline.rs')
-rw-r--r-- | components/compositing/pipeline.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs index 9bb29db622f..27ee5eba150 100644 --- a/components/compositing/pipeline.rs +++ b/components/compositing/pipeline.rs @@ -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( |