aboutsummaryrefslogtreecommitdiffstats
path: root/components/compositing/pipeline.rs
diff options
context:
space:
mode:
authorPawel Kondzior <pawel@kondzior.com>2015-02-19 11:20:55 +0700
committerPawel Kondzior <pawel@kondzior.com>2015-02-24 05:33:27 +0100
commitc2961c94b49a401d647e3f10cf04cd74aa7287c8 (patch)
tree710a28fef8f76006e6978ab37ee7521774fd487d /components/compositing/pipeline.rs
parentdc31d96f65246def19cb7a23f3a62795cd7344a1 (diff)
downloadservo-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.rs10
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(