aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webxr/xrinputsourcearray.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/webxr/xrinputsourcearray.rs')
-rw-r--r--components/script/dom/webxr/xrinputsourcearray.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/components/script/dom/webxr/xrinputsourcearray.rs b/components/script/dom/webxr/xrinputsourcearray.rs
index 5c26f2b5824..98e9ac2c85b 100644
--- a/components/script/dom/webxr/xrinputsourcearray.rs
+++ b/components/script/dom/webxr/xrinputsourcearray.rs
@@ -18,7 +18,7 @@ use crate::dom::xrsession::XRSession;
use crate::script_runtime::CanGc;
#[dom_struct]
-pub struct XRInputSourceArray {
+pub(crate) struct XRInputSourceArray {
reflector_: Reflector,
input_sources: DomRefCell<Vec<Dom<XRInputSource>>>,
}
@@ -31,7 +31,7 @@ impl XRInputSourceArray {
}
}
- pub fn new(global: &GlobalScope) -> DomRoot<XRInputSourceArray> {
+ pub(crate) fn new(global: &GlobalScope) -> DomRoot<XRInputSourceArray> {
reflect_dom_object(
Box::new(XRInputSourceArray::new_inherited()),
global,
@@ -39,7 +39,12 @@ impl XRInputSourceArray {
)
}
- pub fn add_input_sources(&self, session: &XRSession, inputs: &[InputSource], can_gc: CanGc) {
+ pub(crate) fn add_input_sources(
+ &self,
+ session: &XRSession,
+ inputs: &[InputSource],
+ can_gc: CanGc,
+ ) {
let global = self.global();
let mut added = vec![];
@@ -72,7 +77,7 @@ impl XRInputSourceArray {
event.upcast::<Event>().fire(session.upcast(), can_gc);
}
- pub fn remove_input_source(&self, session: &XRSession, id: InputId, can_gc: CanGc) {
+ pub(crate) fn remove_input_source(&self, session: &XRSession, id: InputId, can_gc: CanGc) {
let global = self.global();
let removed = if let Some(i) = self.input_sources.borrow().iter().find(|i| i.id() == id) {
i.gamepad().update_connected(false, false, can_gc);
@@ -95,7 +100,7 @@ impl XRInputSourceArray {
event.upcast::<Event>().fire(session.upcast(), can_gc);
}
- pub fn add_remove_input_source(
+ pub(crate) fn add_remove_input_source(
&self,
session: &XRSession,
id: InputId,
@@ -131,7 +136,7 @@ impl XRInputSourceArray {
event.upcast::<Event>().fire(session.upcast(), can_gc);
}
- pub fn find(&self, id: InputId) -> Option<DomRoot<XRInputSource>> {
+ pub(crate) fn find(&self, id: InputId) -> Option<DomRoot<XRInputSource>> {
self.input_sources
.borrow()
.iter()