Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / vr / XRReferenceSpace.h
blob7a6f9a54bb9a2e31bb6175dc4be648a3c626f497
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_XRReferenceSpace_h_
8 #define mozilla_dom_XRReferenceSpace_h_
10 #include "mozilla/DOMEventTargetHelper.h"
11 #include "mozilla/dom/WebXRBinding.h"
12 #include "mozilla/dom/XRSpace.h"
14 #include "gfxVR.h"
16 namespace mozilla::dom {
18 enum class XRReferenceSpaceType : uint8_t;
19 class XRRigidTransform;
20 class XRSession;
22 class XRReferenceSpace : public XRSpace {
23 public:
24 explicit XRReferenceSpace(nsIGlobalObject* aParent, XRSession* aSession,
25 XRNativeOrigin* aNativeOrigin,
26 XRReferenceSpaceType aType);
28 // WebIDL Boilerplate
29 JSObject* WrapObject(JSContext* aCx,
30 JS::Handle<JSObject*> aGivenProto) override;
32 // WebIDL Members
33 virtual already_AddRefed<XRReferenceSpace> GetOffsetReferenceSpace(
34 const XRRigidTransform& aOriginOffset);
36 // TODO (Bug 1611309): Implement XRReferenceSpace reset events
37 // https://immersive-web.github.io/webxr/#eventdef-xrreferencespace-reset
38 IMPL_EVENT_HANDLER(reset);
40 protected:
41 virtual ~XRReferenceSpace() = default;
42 XRReferenceSpaceType mType;
45 } // namespace mozilla::dom
47 #endif // mozilla_dom_XRReferenceSpace_h_