diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/xr/xr_frame.h')
-rw-r--r-- | chromium/third_party/blink/renderer/modules/xr/xr_frame.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/chromium/third_party/blink/renderer/modules/xr/xr_frame.h b/chromium/third_party/blink/renderer/modules/xr/xr_frame.h index a6376db5aef..15e9e5996fd 100644 --- a/chromium/third_party/blink/renderer/modules/xr/xr_frame.h +++ b/chromium/third_party/blink/renderer/modules/xr/xr_frame.h @@ -9,6 +9,7 @@ #include "device/vr/public/mojom/vr_service.mojom-blink-forward.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise.h" +#include "third_party/blink/renderer/platform/bindings/script_state.h" #include "third_party/blink/renderer/platform/bindings/script_wrappable.h" #include "third_party/blink/renderer/platform/heap/handle.h" #include "third_party/blink/renderer/platform/transforms/transformation_matrix.h" @@ -23,6 +24,7 @@ class XRHitTestSource; class XRInputSource; class XRPose; class XRReferenceSpace; +class XRRigidTransform; class XRSession; class XRSpace; class XRTransientInputHitTestResult; @@ -43,9 +45,7 @@ class XRFrame final : public ScriptWrappable { XRWorldInformation* worldInformation() const { return world_information_; } XRAnchorSet* trackedAnchors() const; - void SetMojoFromViewer(const TransformationMatrix&, bool emulated_position); - - void Trace(blink::Visitor*) override; + void Trace(Visitor*) override; void Deactivate(); @@ -62,7 +62,10 @@ class XRFrame final : public ScriptWrappable { XRTransientInputHitTestSource* hit_test_source, ExceptionState& exception_state); - bool EmulatedPosition() const { return emulated_position_; } + ScriptPromise createAnchor(ScriptState* script_state, + XRRigidTransform* initial_pose, + XRSpace* space, + ExceptionState& exception_state); private: std::unique_ptr<TransformationMatrix> GetAdjustedPoseMatrix(XRSpace*) const; @@ -73,10 +76,6 @@ class XRFrame final : public ScriptWrappable { const Member<XRSession> session_; - // Viewer pose in mojo space, the matrix maps from viewer (headset) space to - // mojo space. - std::unique_ptr<TransformationMatrix> mojo_from_viewer_; - // Frames are only active during callbacks. getPose and getViewerPose should // only be called from JS on active frames. bool is_active_ = true; @@ -85,8 +84,6 @@ class XRFrame final : public ScriptWrappable { // animation frames. getViewerPose should only be called from JS on active // animation frames. bool is_animation_frame_ = false; - - bool emulated_position_ = false; }; } // namespace blink |