tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

XRViewerPose.h (1339B)


      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/. */
      6 
      7 #ifndef mozilla_dom_XRViewerPose_h_
      8 #define mozilla_dom_XRViewerPose_h_
      9 
     10 #include "gfxVR.h"
     11 #include "mozilla/DOMEventTargetHelper.h"
     12 #include "mozilla/dom/WebXRBinding.h"
     13 #include "mozilla/dom/XRPose.h"
     14 
     15 namespace mozilla::dom {
     16 
     17 class XRRigidTransform;
     18 class XRView;
     19 
     20 class XRViewerPose final : public XRPose {
     21 public:
     22  NS_DECL_ISUPPORTS_INHERITED
     23  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XRViewerPose, XRPose)
     24 
     25  explicit XRViewerPose(nsISupports* aParent, XRRigidTransform* aTransform,
     26                        bool aEmulatedPosition,
     27                        const nsTArray<RefPtr<XRView>>& aViews);
     28  RefPtr<XRView>& GetEye(int32_t aIndex);
     29 
     30  // WebIDL Boilerplate
     31  JSObject* WrapObject(JSContext* aCx,
     32                       JS::Handle<JSObject*> aGivenProto) override;
     33 
     34  // WebIDL Members
     35  void GetViews(nsTArray<RefPtr<XRView>>& aResult);
     36 
     37 protected:
     38  virtual ~XRViewerPose() = default;
     39  nsTArray<RefPtr<XRView>> mViews;
     40 };
     41 
     42 }  // namespace mozilla::dom
     43 
     44 #endif  // mozilla_dom_XRViewerPose_h_