chromium/third_party/blink/renderer/modules/xr/xr_input_source.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/modules/xr/xr_input_source.h"

#include "base/time/time.h"
#include "third_party/blink/public/mojom/frame/user_activation_notification_type.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/frozen_array.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/events/event_dispatcher.h"
#include "third_party/blink/renderer/core/dom/events/event_path.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/html/html_frame_element_base.h"
#include "third_party/blink/renderer/core/input/event_handling_util.h"
#include "third_party/blink/renderer/core/layout/hit_test_location.h"
#include "third_party/blink/renderer/modules/xr/xr_grip_space.h"
#include "third_party/blink/renderer/modules/xr/xr_hand.h"
#include "third_party/blink/renderer/modules/xr/xr_input_source_event.h"
#include "third_party/blink/renderer/modules/xr/xr_session.h"
#include "third_party/blink/renderer/modules/xr/xr_session_event.h"
#include "third_party/blink/renderer/modules/xr/xr_space.h"
#include "third_party/blink/renderer/modules/xr/xr_system.h"
#include "third_party/blink/renderer/modules/xr/xr_target_ray_space.h"
#include "third_party/blink/renderer/modules/xr/xr_utils.h"

namespace blink {

namespace {
std::unique_ptr<gfx::Transform> TryGetTransform(
    const std::optional<gfx::Transform>& transform) {}

std::unique_ptr<gfx::Transform> TryGetTransform(const gfx::Transform* other) {}
}  // namespace

XRInputSource::InternalState::InternalState(
    uint32_t source_id,
    device::mojom::XRTargetRayMode target_ray_mode,
    base::TimeTicks base_timestamp)
    :{}

XRInputSource::InternalState::InternalState(const InternalState& other) =
    default;

XRInputSource::InternalState::~InternalState() = default;

// static
XRInputSource* XRInputSource::CreateOrUpdateFrom(
    XRInputSource* other,
    XRSession* session,
    const device::mojom::blink::XRInputSourceStatePtr& state) {}

XRInputSource::XRInputSource(XRSession* session,
                             uint32_t source_id,
                             device::mojom::XRTargetRayMode target_ray_mode)
    :{}

// Must make new target_ray_space_ and grip_space_ to ensure that they point to
// the correct XRInputSource object. Otherwise, the controller position gets
// stuck when an XRInputSource gets re-created. Also need to make a deep copy of
// the matrices since they use unique_ptrs.
XRInputSource::XRInputSource(const XRInputSource& other)
    :{}

const String XRInputSource::handedness() const {}

const String XRInputSource::targetRayMode() const {}

XRSpace* XRInputSource::targetRaySpace() const {}

XRSpace* XRInputSource::gripSpace() const {}

bool XRInputSource::InvalidatesSameObject(
    const device::mojom::blink::XRInputSourceStatePtr& state) {}

void XRInputSource::SetInputFromPointer(
    const gfx::Transform* input_from_pointer) {}

void XRInputSource::SetGamepadConnected(bool state) {}

void XRInputSource::UpdateGamepad(
    const std::optional<device::Gamepad>& gamepad) {}

void XRInputSource::UpdateHand(
    const device::mojom::blink::XRHandTrackingData* hand_tracking_data) {}

std::optional<gfx::Transform> XRInputSource::MojoFromInput() const {}

std::optional<gfx::Transform> XRInputSource::InputFromPointer() const {}

void XRInputSource::OnSelectStart() {}

void XRInputSource::OnSelectEnd() {}

void XRInputSource::OnSelect() {}

void XRInputSource::OnSqueezeStart() {}

void XRInputSource::OnSqueezeEnd() {}

void XRInputSource::OnSqueeze() {}

void XRInputSource::UpdateButtonStates(
    const device::mojom::blink::XRInputSourceStatePtr& new_state) {}

void XRInputSource::ProcessOverlayHitTest(
    Element* overlay_element,
    const device::mojom::blink::XRInputSourceStatePtr& new_state) {}

void XRInputSource::OnRemoved() {}

XRInputSourceEvent* XRInputSource::CreateInputSourceEvent(
    const AtomicString& type) {}

void XRInputSource::Trace(Visitor* visitor) const {}

}  // namespace blink