chromium/device/vr/test/test_hook.h

// 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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#ifndef DEVICE_VR_TEST_TEST_HOOK_H_
#define DEVICE_VR_TEST_TEST_HOOK_H_

#include "base/check.h"
#include "device/vr/public/mojom/browser_test_interfaces.mojom.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/transform.h"

#include <cstdint>

namespace device {

// Update this string whenever either interface changes.
constexpr unsigned int kMaxTrackedDevices =;
constexpr unsigned int kMaxNumAxes =;

// These are largely the same as the OpenVR button/axis constants, but kept
// separate so they're more runtime-agnostic.
enum XrButtonId {};

enum XrAxisType {};

enum class XrEye {};

inline uint64_t XrButtonMaskFromId(XrButtonId id) {}

inline unsigned int XrAxisOffsetFromId(XrButtonId id) {}

struct Color {};

struct ViewData {};

struct PoseFrameData {};

struct DeviceConfig {};

struct ControllerAxisData {};

enum TrackedDeviceClass {};

enum ControllerRole {};

struct ControllerFrameData {};

inline gfx::Transform PoseFrameDataToTransform(PoseFrameData data) {}

// Tests may implement this, and register it to control behavior of VR runtime.
class VRTestHook {};

class ServiceTestHook {};

}  // namespace device

#endif  // DEVICE_VR_TEST_TEST_HOOK_H_