Support profiles

This commit is contained in:
Manish Goregaokar 2020-01-13 15:31:31 +05:30
parent 9c34a6585b
commit e0135fe783
10 changed files with 40 additions and 17 deletions

View file

@ -12,6 +12,7 @@ use crate::dom::bindings::codegen::Bindings::XRInputSourceBinding::{
use crate::dom::bindings::error::Fallible;
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::DOMString;
use crate::dom::fakexrdevice::get_origin;
use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
@ -128,4 +129,10 @@ impl FakeXRInputControllerMethods for FakeXRInputController {
};
let _ = self.send_message(MockInputMsg::SetTargetRayMode(t));
}
/// https://immersive-web.github.io/webxr-test-api/#dom-fakexrinputcontroller-setprofiles
fn SetProfiles(&self, profiles: Vec<DOMString>) {
let t = profiles.into_iter().map(String::from).collect();
let _ = self.send_message(MockInputMsg::SetProfiles(t));
}
}