Expose webxr registry to window

This commit is contained in:
Manish Goregaokar 2019-07-05 13:37:10 -07:00
parent 305312e93b
commit 5f69a9e66a
2 changed files with 10 additions and 0 deletions

View file

@ -266,6 +266,9 @@ pub struct Window {
#[ignore_malloc_size_of = "channels are hard"]
webvr_chan: Option<IpcSender<WebVRMsg>>,
#[ignore_malloc_size_of = "defined in webxr"]
webxr_registry: webxr_api::Registry,
/// A map for storing the previous permission state read results.
permission_state_invocation_results: DomRefCell<HashMap<String, PermissionState>>,
@ -436,6 +439,10 @@ impl Window {
self.webvr_chan.clone()
}
pub fn webxr_registry(&self) -> &webxr_api::Registry {
&self.webxr_registry
}
fn new_paint_worklet(&self) -> DomRoot<Worklet> {
debug!("Creating new paint worklet.");
Worklet::new(self, WorkletGlobalScopeType::Paint)
@ -2072,6 +2079,7 @@ impl Window {
navigation_start_precise: u64,
webgl_chan: Option<WebGLChan>,
webvr_chan: Option<IpcSender<WebVRMsg>>,
webxr_registry: webxr_api::Registry,
microtask_queue: Rc<MicrotaskQueue>,
webrender_document: DocumentId,
webrender_api_sender: RenderApiSender,
@ -2149,6 +2157,7 @@ impl Window {
test_runner: Default::default(),
webgl_chan,
webvr_chan,
webxr_registry,
permission_state_invocation_results: Default::default(),
pending_layout_images: Default::default(),
unminified_js_dir: Default::default(),