#include "device/vr/vr_device_base.h"
#include <utility>
#include "base/metrics/histogram_functions.h"
#include "build/build_config.h"
#include "device/vr/public/cpp/vr_device_provider.h"
#if BUILDFLAG(IS_WIN)
#include "base/win/windows_types.h"
#endif
namespace device {
VRDeviceBase::VRDeviceBase(mojom::XRDeviceId id) : … { … }
VRDeviceBase::~VRDeviceBase() = default;
mojom::XRDeviceId VRDeviceBase::GetId() const { … }
mojom::XRDeviceDataPtr VRDeviceBase::GetDeviceData() const { … }
void VRDeviceBase::PauseTracking() { … }
void VRDeviceBase::ResumeTracking() { … }
void VRDeviceBase::OnExitPresent() { … }
void VRDeviceBase::OnStartPresenting() { … }
bool VRDeviceBase::HasExclusiveSession() { … }
void VRDeviceBase::ListenToDeviceChanges(
mojo::PendingAssociatedRemote<mojom::XRRuntimeEventListener>
listener_info) { … }
void VRDeviceBase::OnVisibilityStateChanged(
mojom::XRVisibilityState visibility_state) { … }
void VRDeviceBase::SetArBlendModeSupported(bool is_ar_blend_mode_supported) { … }
#if BUILDFLAG(IS_WIN)
void VRDeviceBase::SetLuid(const CHROME_LUID& luid) {
if (luid.HighPart != 0 || luid.LowPart != 0) {
device_data_.luid = luid;
}
}
#endif
mojo::PendingRemote<mojom::XRRuntime> VRDeviceBase::BindXRRuntime() { … }
void LogViewerType(VrViewerType type) { … }
void VRDeviceBase::SetSupportedFeatures(
const std::vector<mojom::XRSessionFeature>& features) { … }
void VRDeviceBase::SetDeviceData(device::mojom::XRDeviceData&& device_data) { … }
}