aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2015-08-12 16:19:30 +0200
committerMs2ger <Ms2ger@gmail.com>2015-08-12 16:19:30 +0200
commit0aae98e9c08d8b3d839016afdd0b5612eaecff02 (patch)
tree124ca8a2310a7a9bd153667cfee1a4ebcf1eaff2
parent250fdc33f44a8dfbac9b7ee637d41ff02d1eb9f3 (diff)
downloadservo-0aae98e9c08d8b3d839016afdd0b5612eaecff02.tar.gz
servo-0aae98e9c08d8b3d839016afdd0b5612eaecff02.zip
Pass a Sender<ConstellationControlMsg> to Pipeline::new.
-rw-r--r--components/compositing/constellation.rs6
-rw-r--r--components/compositing/pipeline.rs15
2 files changed, 10 insertions, 11 deletions
diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs
index d66966cbd26..81cdbd9a374 100644
--- a/components/compositing/constellation.rs
+++ b/components/compositing/constellation.rs
@@ -41,7 +41,7 @@ use offscreen_gl_context::GLContextAttributes;
use profile_traits::mem;
use profile_traits::time;
use script_traits::{CompositorEvent, ConstellationControlMsg, LayoutControlMsg};
-use script_traits::{ScriptControlChan, ScriptState, ScriptTaskFactory};
+use script_traits::{ScriptState, ScriptTaskFactory};
use std::borrow::ToOwned;
use std::collections::HashMap;
use std::io::{self, Write};
@@ -287,7 +287,7 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
fn new_pipeline(&mut self,
parent_info: Option<(PipelineId, SubpageId)>,
initial_window_rect: Option<TypedRect<PagePx, f32>>,
- script_channel: Option<ScriptControlChan>,
+ script_channel: Option<Sender<ConstellationControlMsg>>,
load_data: LoadData)
-> PipelineId {
let pipeline_id = self.next_pipeline_id;
@@ -648,7 +648,7 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
if same_script {
debug!("Constellation: loading same-origin iframe, \
parent url {:?}, iframe url {:?}", source_url, url);
- Some(ScriptControlChan(source_pipeline.script_chan.clone()))
+ Some(source_pipeline.script_chan.clone())
} else {
debug!("Constellation: loading cross-origin iframe, \
parent url {:?}, iframe url {:?}", source_url, url);
diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs
index a73dc891d84..a78f606f870 100644
--- a/components/compositing/pipeline.rs
+++ b/components/compositing/pipeline.rs
@@ -4,7 +4,7 @@
use CompositorProxy;
use layout_traits::{LayoutTaskFactory, LayoutControlChan};
-use script_traits::{LayoutControlMsg, ScriptControlChan, ScriptTaskFactory};
+use script_traits::{LayoutControlMsg, ScriptTaskFactory};
use script_traits::{NewLayoutInfo, ConstellationControlMsg};
use compositor_task;
@@ -80,7 +80,7 @@ impl Pipeline {
time_profiler_chan: time::ProfilerChan,
mem_profiler_chan: profile_mem::ProfilerChan,
window_rect: Option<TypedRect<PagePx, f32>>,
- script_chan: Option<ScriptControlChan>,
+ script_chan: Option<Sender<ConstellationControlMsg>>,
load_data: LoadData,
device_pixel_ratio: ScaleFactor<ViewportPx, DevicePixel, f32>)
-> (Pipeline, PipelineContent)
@@ -131,14 +131,13 @@ impl Pipeline {
layout_shutdown_chan: layout_shutdown_chan.clone(),
};
- script_chan.0
- .send(ConstellationControlMsg::AttachLayout(new_layout_info))
+ script_chan.send(ConstellationControlMsg::AttachLayout(new_layout_info))
.unwrap();
(script_chan, None)
}
None => {
let (script_chan, script_port) = channel();
- (ScriptControlChan(script_chan), Some(script_port))
+ (script_chan, Some(script_port))
}
};
@@ -165,7 +164,7 @@ impl Pipeline {
time_profiler_chan: time_profiler_chan,
mem_profiler_chan: mem_profiler_chan,
window_size: window_size,
- script_chan: script_chan.0,
+ script_chan: script_chan,
load_data: load_data,
failure: failure,
script_port: script_port,
@@ -183,7 +182,7 @@ impl Pipeline {
pub fn new(id: PipelineId,
parent_info: Option<(PipelineId, SubpageId)>,
- script_chan: ScriptControlChan,
+ script_chan: Sender<ConstellationControlMsg>,
layout_chan: LayoutControlChan,
chrome_to_paint_chan: Sender<ChromeToPaintMsg>,
layout_shutdown_port: Receiver<()>,
@@ -194,7 +193,7 @@ impl Pipeline {
Pipeline {
id: id,
parent_info: parent_info,
- script_chan: script_chan.0,
+ script_chan: script_chan,
layout_chan: layout_chan,
chrome_to_paint_chan: chrome_to_paint_chan,
layout_shutdown_port: layout_shutdown_port,