aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/engine_interface.rs
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2013-06-17 13:21:34 -0700
committerbors-servo <release+servo@mozilla.com>2013-06-17 13:21:34 -0700
commitd61c4553409089ff51788e485bf426278fc3a30e (patch)
tree3d040da92e94ac90afaa2eaaeee493c6ce16d3bb /src/components/script/engine_interface.rs
parent93eea6b2e87adedf833790d045bf69417ca9b7e3 (diff)
parent577a410f806d991f48c9f350a060aa1aca72eab8 (diff)
downloadservo-d61c4553409089ff51788e485bf426278fc3a30e.tar.gz
servo-d61c4553409089ff51788e485bf426278fc3a30e.zip
auto merge of #517 : tkuehn/servo/master, r=metajack
communicate via layout refactor channel wrappers from *Task --> *Chan
Diffstat (limited to 'src/components/script/engine_interface.rs')
-rw-r--r--src/components/script/engine_interface.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/components/script/engine_interface.rs b/src/components/script/engine_interface.rs
index 2705ebdb137..c7a33334c97 100644
--- a/src/components/script/engine_interface.rs
+++ b/src/components/script/engine_interface.rs
@@ -8,7 +8,21 @@
use core::comm::{Chan, SharedChan};
use std::net::url::Url;
-pub type EngineTask = SharedChan<Msg>;
+#[deriving(Clone)]
+pub struct EngineChan {
+ chan: SharedChan<Msg>,
+}
+
+impl EngineChan {
+ pub fn new(chan: Chan<Msg>) -> EngineChan {
+ EngineChan {
+ chan: SharedChan::new(chan),
+ }
+ }
+ pub fn send(&self, msg: Msg) {
+ self.chan.send(msg);
+ }
+}
pub enum Msg {
LoadUrlMsg(Url),