Private browsing - Initial steps

This commit is contained in:
dhaval0603 2016-03-23 15:28:49 -04:00 committed by Josh Matthews
parent afa5ae4c72
commit af64a888e6
5 changed files with 36 additions and 0 deletions

View file

@ -1501,6 +1501,19 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF>
ReadyToSave::Ready
}
/// Checks whether the pipeline or its ancestors are private
#[allow(dead_code)]
fn check_is_pipeline_private(&self, pipeline_id: PipelineId) -> bool {
let mut pipeline_id = Some(pipeline_id);
while let Some(pipeline) = pipeline_id.and_then(|id| self.pipelines.get(&id)) {
if pipeline.is_private {
return true;
}
pipeline_id = pipeline.parent_info.map(|(parent_pipeline_id, _)| parent_pipeline_id);
}
false
}
// Close a frame (and all children)
fn close_frame(&mut self, frame_id: FrameId, exit_mode: ExitPipelineMode) {
// Store information about the pipelines to be closed. Then close the

View file

@ -58,6 +58,7 @@ pub struct Pipeline {
/// animations cause composites to be continually scheduled.
pub running_animations: bool,
pub children: Vec<FrameId>,
pub is_private: bool,
}
/// The subset of the pipeline that is needed for layer composition.
@ -275,6 +276,7 @@ impl Pipeline {
children: vec!(),
size: size,
running_animations: false,
is_private: false,
}
}