diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2019-07-05 13:37:10 -0700 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2019-07-10 23:12:34 -0700 |
commit | 5f69a9e66a085983073ace7ff7e2df24423d5cbd (patch) | |
tree | 9ef5e2119589b8c69a1f0bfe268532f55124bb9f /components/script | |
parent | 305312e93b5cd2bc40d2c6341771eb86eac179a7 (diff) | |
download | servo-5f69a9e66a085983073ace7ff7e2df24423d5cbd.tar.gz servo-5f69a9e66a085983073ace7ff7e2df24423d5cbd.zip |
Expose webxr registry to window
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/dom/window.rs | 9 | ||||
-rw-r--r-- | components/script/script_thread.rs | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 8ca1e324511..b978d819dea 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -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(), diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index e6d91a1bc2e..38ca94953d3 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -2975,6 +2975,7 @@ impl ScriptThread { incomplete.navigation_start_precise, self.webgl_chan.as_ref().map(|chan| chan.channel()), self.webvr_chan.clone(), + self.webxr_registry.clone(), self.microtask_queue.clone(), self.webrender_document, self.webrender_api_sender.clone(), |