tree: 87ef1ceda7637b77ce041f676491f185594e0314 [path history] [tgz]
  1. BUILD.gn
  2. DEPS
  3. DIR_METADATA
  4. OWNERS
  5. README.md
  6. xr_device_service.cc
  7. xr_device_service.h
  8. xr_runtime_provider.cc
  9. xr_runtime_provider.h
  10. xr_service_test_hook.cc
  11. xr_service_test_hook.h
  12. xr_test_hook_wrapper.cc
  13. xr_test_hook_wrapper.h
content/services/isolated_xr_device/README.md

Isolated XR Device Service

For a more thorough/high level overview of the entire WebXR stack, please refer to components/webxr

Chromium's WebXR implementation makes use of the multiprocess architecture for added security. Thus all code which directly interfaces with and talks to the XR hardware (“runtimes”) ends up loaded/hosted in a separate XR Utility process, except on Android where this is not possible. The XrDeviceService serves as the entry point for the VRServiceImpl in content/browser/xr to talk to this process, while the IsolatedXRRuntimeProvider is the main in-process entry point. The runtime provider continually polls for supported runtimes and when a change is detected creates and returns the appropriate runtime over mojom. The mojom interfaces used by this process are defined in device/vr.

Testing

This folder also defines test hooks. Tests can set this to modify the behavior of the IsolatedXRRuntimeProvider and force it to create a fake XR Device which the tests can fully control.