Move VR interface to XR

The WebVR spec no longer has a navigator.vr, but there is a navigator.XR in the XR spec. Instead of duplicating work I've combined the two.
This commit is contained in:
Manish Goregaokar 2018-12-19 14:17:14 -08:00
parent c553c43ba1
commit 376426a936
6 changed files with 55 additions and 42 deletions

View file

@ -26,6 +26,7 @@ use crate::dom::bindings::codegen::Bindings::DocumentBinding::{
DocumentMethods, DocumentReadyState,
};
use crate::dom::bindings::codegen::Bindings::EventBinding::EventInit;
use crate::dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods;
use crate::dom::bindings::codegen::Bindings::TransitionEventBinding::TransitionEventInit;
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use crate::dom::bindings::conversions::{
@ -3278,8 +3279,8 @@ impl ScriptThread {
fn handle_webvr_events(&self, pipeline_id: PipelineId, events: Vec<WebVREvent>) {
let window = self.documents.borrow().find_window(pipeline_id);
if let Some(window) = window {
let vr = window.Navigator().Vr();
vr.handle_webvr_events(events);
let xr = window.Navigator().Xr();
xr.handle_webvr_events(events);
}
}