Commit fc1b3bfe authored by Alexander Cooper's avatar Alexander Cooper Committed by Commit Bot

Stop looking for Oculus and OpenVR specific runtimes

Oculus and OpenVR both have beta runtimes that will allow running their
devices via OpenXR. In order to simplify the Chrome codebase, we will
stop running Oculus and OpenVR against their own runtimes (which have
not shipped), and run them via their OpenXR implementations.

Note that with OpenVR being removed, the test macros needed to be
modified to stop running against it, as well as a few OpenVR specific
tests needing to be removed. Oculus runtime was never tested in an
automatic fashion.

Bug:1121624

Change-Id: Ibdf13532e922db1290062186fd5ec45885d5b46b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2373392Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802077}
parent 51fbcb70
...@@ -63,20 +63,22 @@ ...@@ -63,20 +63,22 @@
MULTI_CLASS_RUNNER_NAME_(test_name)::ActuallyRunTestOnMainThread(this); \ MULTI_CLASS_RUNNER_NAME_(test_name)::ActuallyRunTestOnMainThread(this); \
} }
#define IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(test_class1, test_class2, \ // In this case IN_PROC_BROWSER_TEST_F could realistically be used; however, in
base_class, test_name) \ // some cases, we're conditionally enabling runtimes. This method thus enables
// easily "switching" between having only one runtime enabled and having two or
// more runtimes enabled, and helps make the "ALL_RUNTIMES" macros possible.
#define IN_PROC_MULTI_CLASS_BROWSER_TEST_F1(test_class1, base_class, \
test_name) \
DEFINE_RUN_TEST_IMPL_(test_name, base_class) \ DEFINE_RUN_TEST_IMPL_(test_name, base_class) \
DEFINE_BROWSER_TEST_(test_class1, test_name) \ DEFINE_BROWSER_TEST_(test_class1, test_name) \
DEFINE_BROWSER_TEST_(test_class2, test_name) \
void MULTI_CLASS_RUNNER_NAME_(test_name)::ActuallyRunTestOnMainThread( \ void MULTI_CLASS_RUNNER_NAME_(test_name)::ActuallyRunTestOnMainThread( \
base_class* t) base_class* t)
#define IN_PROC_MULTI_CLASS_BROWSER_TEST_F3( \ #define IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(test_class1, test_class2, \
test_class1, test_class2, test_class3, base_class, test_name) \ base_class, test_name) \
DEFINE_RUN_TEST_IMPL_(test_name, base_class) \ DEFINE_RUN_TEST_IMPL_(test_name, base_class) \
DEFINE_BROWSER_TEST_(test_class1, test_name) \ DEFINE_BROWSER_TEST_(test_class1, test_name) \
DEFINE_BROWSER_TEST_(test_class2, test_name) \ DEFINE_BROWSER_TEST_(test_class2, test_name) \
DEFINE_BROWSER_TEST_(test_class3, test_name) \
void MULTI_CLASS_RUNNER_NAME_(test_name)::ActuallyRunTestOnMainThread( \ void MULTI_CLASS_RUNNER_NAME_(test_name)::ActuallyRunTestOnMainThread( \
base_class* t) base_class* t)
...@@ -90,45 +92,43 @@ ...@@ -90,45 +92,43 @@
void MULTI_CLASS_RUNNER_NAME_(test_name)::ActuallyRunTestOnMainThread( \ void MULTI_CLASS_RUNNER_NAME_(test_name)::ActuallyRunTestOnMainThread( \
base_class* t) base_class* t)
#define IN_PROC_MULTI_CLASS_PLUS_INCOGNITO_BROWSER_TEST_F3( \ // In this case IN_PROC_BROWSER_TEST_F could realistically be used; however, in
test_class1, test_class2, test_class3, base_class, test_name) \ // some cases, we're conditionally enabling runtimes. This method thus enables
// easily "switching" between having only one runtime enabled and having two or
// more runtimes enabled, and helps make the "ALL_RUNTIMES" macros possible.
#define IN_PROC_MULTI_CLASS_PLUS_INCOGNITO_BROWSER_TEST_F1( \
test_class1, base_class, test_name) \
DEFINE_RUN_TEST_IMPL_(test_name, base_class) \ DEFINE_RUN_TEST_IMPL_(test_name, base_class) \
DEFINE_BROWSER_TEST_(test_class1, test_name) \ DEFINE_BROWSER_TEST_(test_class1, test_name) \
DEFINE_BROWSER_TEST_(test_class2, test_name) \
DEFINE_BROWSER_TEST_(test_class3, test_name) \
DEFINE_INCOGNITO_BROWSER_TEST_(test_class1, test_name) \ DEFINE_INCOGNITO_BROWSER_TEST_(test_class1, test_name) \
DEFINE_INCOGNITO_BROWSER_TEST_(test_class2, test_name) \
DEFINE_INCOGNITO_BROWSER_TEST_(test_class3, test_name) \
void MULTI_CLASS_RUNNER_NAME_(test_name)::ActuallyRunTestOnMainThread( \ void MULTI_CLASS_RUNNER_NAME_(test_name)::ActuallyRunTestOnMainThread( \
base_class* t) base_class* t)
// Helper macro to cut down on duplicate code since most uses of // Helper macro to cut down on duplicate code since most uses of
// IN_PROC_MULTI_CLASS_BROWSER_TEST_F3 are passed the same OpenVR, WMR, and // IN_PROC_MULTI_CLASS_BROWSER_TEST_F2 are passed the same WMR, and OpenXR
// OpenXR classes and the same base class // classes and the same base class
#if BUILDFLAG(ENABLE_OPENXR) #if BUILDFLAG(ENABLE_OPENXR)
#define WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F(test_name) \
IN_PROC_MULTI_CLASS_BROWSER_TEST_F3( \
WebXrVrOpenVrBrowserTest, WebXrVrWmrBrowserTest, \
WebXrVrOpenXrBrowserTest, WebXrVrBrowserTestBase, test_name)
#else
#define WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F(test_name) \ #define WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F(test_name) \
IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(WebXrVrOpenVrBrowserTest, \ IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(WebXrVrWmrBrowserTest, \
WebXrVrWmrBrowserTest, \ WebXrVrOpenXrBrowserTest, \
WebXrVrBrowserTestBase, test_name)
#else
#define WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F(test_name) \
IN_PROC_MULTI_CLASS_BROWSER_TEST_F1(WebXrVrWmrBrowserTest, \
WebXrVrBrowserTestBase, test_name) WebXrVrBrowserTestBase, test_name)
#endif // BUILDFLAG(ENABLE_OPENXR) #endif // BUILDFLAG(ENABLE_OPENXR)
// The same as WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F, but runs the tests in // The same as WEBXR_VR_ALL_RUNTIMES_BROWSER_TEST_F, but runs the tests in
// incognito mode as well. // incognito mode as well.
#if BUILDFLAG(ENABLE_OPENXR) #if BUILDFLAG(ENABLE_OPENXR)
#define WEBXR_VR_ALL_RUNTIMES_PLUS_INCOGNITO_BROWSER_TEST_F(test_name) \
IN_PROC_MULTI_CLASS_PLUS_INCOGNITO_BROWSER_TEST_F3( \
WebXrVrOpenVrBrowserTest, WebXrVrWmrBrowserTest, \
WebXrVrOpenXrBrowserTest, WebXrVrBrowserTestBase, test_name)
#else
#define WEBXR_VR_ALL_RUNTIMES_PLUS_INCOGNITO_BROWSER_TEST_F(test_name) \ #define WEBXR_VR_ALL_RUNTIMES_PLUS_INCOGNITO_BROWSER_TEST_F(test_name) \
IN_PROC_MULTI_CLASS_PLUS_INCOGNITO_BROWSER_TEST_F2( \ IN_PROC_MULTI_CLASS_PLUS_INCOGNITO_BROWSER_TEST_F2( \
WebXrVrOpenVrBrowserTest, WebXrVrWmrBrowserTest, WebXrVrBrowserTestBase, \ WebXrVrOpenXrBrowserTest, WebXrVrWmrBrowserTest, WebXrVrBrowserTestBase, \
test_name) test_name)
#else
#define WEBXR_VR_ALL_RUNTIMES_PLUS_INCOGNITO_BROWSER_TEST_F(test_name) \
IN_PROC_MULTI_CLASS_PLUS_INCOGNITO_BROWSER_TEST_F1( \
WebXrVrWmrBrowserTest, WebXrVrBrowserTestBase, test_name)
#endif // ENABLE_OPENXR #endif // ENABLE_OPENXR
// Helper class to disable a specific runtime of the above // Helper class to disable a specific runtime of the above
......
...@@ -99,28 +99,6 @@ WebXrVrRuntimelessBrowserTestSensorless:: ...@@ -99,28 +99,6 @@ WebXrVrRuntimelessBrowserTestSensorless::
#if defined(OS_WIN) #if defined(OS_WIN)
WebXrVrOpenVrBrowserTestBase::WebXrVrOpenVrBrowserTestBase() {
enable_features_.push_back(device::features::kOpenVR);
#if BUILDFLAG(ENABLE_WINDOWS_MR)
disable_features_.push_back(device::features::kWindowsMixedReality);
#endif
#if BUILDFLAG(ENABLE_OPENXR)
disable_features_.push_back(device::features::kOpenXR);
#endif
}
XrBrowserTestBase::RuntimeType WebXrVrOpenVrBrowserTestBase::GetRuntimeType()
const {
return XrBrowserTestBase::RuntimeType::RUNTIME_OPENVR;
}
gfx::Vector3dF WebXrVrOpenVrBrowserTestBase::GetControllerOffset() const {
// The 0.08f comes from the slight adjustment we perform in
// openvr_render_loop.cc to account for OpenVR reporting the controller
// position at the tip, but WebXR using the position at the grip.
return gfx::Vector3dF(0, 0, 0.08f);
}
WebXrVrWmrBrowserTestBase::WebXrVrWmrBrowserTestBase() { WebXrVrWmrBrowserTestBase::WebXrVrWmrBrowserTestBase() {
#if BUILDFLAG(ENABLE_WINDOWS_MR) #if BUILDFLAG(ENABLE_WINDOWS_MR)
enable_features_.push_back(device::features::kWindowsMixedReality); enable_features_.push_back(device::features::kWindowsMixedReality);
...@@ -159,12 +137,6 @@ XrBrowserTestBase::RuntimeType WebXrVrOpenXrBrowserTestBase::GetRuntimeType() ...@@ -159,12 +137,6 @@ XrBrowserTestBase::RuntimeType WebXrVrOpenXrBrowserTestBase::GetRuntimeType()
} }
#endif // BUILDFLAG(ENABLE_OPENXR) #endif // BUILDFLAG(ENABLE_OPENXR)
WebXrVrOpenVrBrowserTest::WebXrVrOpenVrBrowserTest() {
// We know at this point that we're going to be running with both OpenVR and
// WebXR enabled, so enforce the DirectX 11.1 requirement.
runtime_requirements_.push_back(XrTestRequirement::DIRECTX_11_1);
}
WebXrVrWmrBrowserTest::WebXrVrWmrBrowserTest() { WebXrVrWmrBrowserTest::WebXrVrWmrBrowserTest() {
runtime_requirements_.push_back(XrTestRequirement::DIRECTX_11_1); runtime_requirements_.push_back(XrTestRequirement::DIRECTX_11_1);
} }
...@@ -176,10 +148,6 @@ WebXrVrOpenXrBrowserTest::WebXrVrOpenXrBrowserTest() { ...@@ -176,10 +148,6 @@ WebXrVrOpenXrBrowserTest::WebXrVrOpenXrBrowserTest() {
#endif // BUILDFLAG(ENABLE_OPENXR) #endif // BUILDFLAG(ENABLE_OPENXR)
// Test classes with WebXR disabled. // Test classes with WebXR disabled.
WebXrVrOpenVrBrowserTestWebXrDisabled::WebXrVrOpenVrBrowserTestWebXrDisabled() {
disable_features_.push_back(features::kWebXr);
}
WebXrVrWmrBrowserTestWebXrDisabled::WebXrVrWmrBrowserTestWebXrDisabled() { WebXrVrWmrBrowserTestWebXrDisabled::WebXrVrWmrBrowserTestWebXrDisabled() {
disable_features_.push_back(features::kWebXr); disable_features_.push_back(features::kWebXr);
} }
......
...@@ -53,7 +53,7 @@ class WebXrVrBrowserTestBase : public WebXrBrowserTestBase { ...@@ -53,7 +53,7 @@ class WebXrVrBrowserTestBase : public WebXrBrowserTestBase {
permissions::PermissionRequestManager::ACCEPT_ALL; permissions::PermissionRequestManager::ACCEPT_ALL;
}; };
// Test class with OpenVR disabled. // Test class with all runtimes disabled.
class WebXrVrRuntimelessBrowserTest : public WebXrVrBrowserTestBase { class WebXrVrRuntimelessBrowserTest : public WebXrVrBrowserTestBase {
public: public:
WebXrVrRuntimelessBrowserTest(); WebXrVrRuntimelessBrowserTest();
...@@ -65,16 +65,8 @@ class WebXrVrRuntimelessBrowserTestSensorless ...@@ -65,16 +65,8 @@ class WebXrVrRuntimelessBrowserTestSensorless
WebXrVrRuntimelessBrowserTestSensorless(); WebXrVrRuntimelessBrowserTestSensorless();
}; };
// OpenVR and WMR feature only defined on Windows. // WMR feature only defined on Windows.
#ifdef OS_WIN #ifdef OS_WIN
// OpenVR-specific subclass of WebXrVrBrowserTestBase.
class WebXrVrOpenVrBrowserTestBase : public WebXrVrBrowserTestBase {
public:
WebXrVrOpenVrBrowserTestBase();
XrBrowserTestBase::RuntimeType GetRuntimeType() const override;
gfx::Vector3dF GetControllerOffset() const override;
};
// WMR-specific subclass of WebXrVrBrowserTestBase. // WMR-specific subclass of WebXrVrBrowserTestBase.
class WebXrVrWmrBrowserTestBase : public WebXrVrBrowserTestBase { class WebXrVrWmrBrowserTestBase : public WebXrVrBrowserTestBase {
public: public:
...@@ -102,12 +94,6 @@ class WebXrVrOpenXrBrowserTestBase : public WebXrVrBrowserTestBase { ...@@ -102,12 +94,6 @@ class WebXrVrOpenXrBrowserTestBase : public WebXrVrBrowserTestBase {
}; };
#endif // BUILDFLAG(ENABLE_OPENXR) #endif // BUILDFLAG(ENABLE_OPENXR)
// Test class with standard features enabled: WebXR and OpenVR.
class WebXrVrOpenVrBrowserTest : public WebXrVrOpenVrBrowserTestBase {
public:
WebXrVrOpenVrBrowserTest();
};
class WebXrVrWmrBrowserTest : public WebXrVrWmrBrowserTestBase { class WebXrVrWmrBrowserTest : public WebXrVrWmrBrowserTestBase {
public: public:
WebXrVrWmrBrowserTest(); WebXrVrWmrBrowserTest();
...@@ -120,13 +106,6 @@ class WebXrVrOpenXrBrowserTest : public WebXrVrOpenXrBrowserTestBase { ...@@ -120,13 +106,6 @@ class WebXrVrOpenXrBrowserTest : public WebXrVrOpenXrBrowserTestBase {
}; };
#endif // BUILDFLAG(ENABLE_OPENXR) #endif // BUILDFLAG(ENABLE_OPENXR)
// Test classes with WebXR disabled.
class WebXrVrOpenVrBrowserTestWebXrDisabled
: public WebXrVrOpenVrBrowserTestBase {
public:
WebXrVrOpenVrBrowserTestWebXrDisabled();
};
class WebXrVrWmrBrowserTestWebXrDisabled : public WebXrVrWmrBrowserTestBase { class WebXrVrWmrBrowserTestWebXrDisabled : public WebXrVrWmrBrowserTestBase {
public: public:
WebXrVrWmrBrowserTestWebXrDisabled(); WebXrVrWmrBrowserTestWebXrDisabled();
......
...@@ -73,7 +73,6 @@ class XrBrowserTestBase : public InProcessBrowserTest { ...@@ -73,7 +73,6 @@ class XrBrowserTestBase : public InProcessBrowserTest {
enum class RuntimeType { enum class RuntimeType {
RUNTIME_NONE = 0, RUNTIME_NONE = 0,
RUNTIME_OPENVR = 1,
RUNTIME_WMR = 2, RUNTIME_WMR = 2,
RUNTIME_OPENXR = 3 RUNTIME_OPENXR = 3
}; };
......
...@@ -37,14 +37,12 @@ IN_PROC_BROWSER_TEST_F(WebXrVrRuntimelessBrowserTest, ...@@ -37,14 +37,12 @@ IN_PROC_BROWSER_TEST_F(WebXrVrRuntimelessBrowserTest,
#ifdef OS_WIN #ifdef OS_WIN
#if BUILDFLAG(ENABLE_OPENXR) #if BUILDFLAG(ENABLE_OPENXR)
IN_PROC_MULTI_CLASS_BROWSER_TEST_F3(WebXrVrOpenVrBrowserTestWebXrDisabled, IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(WebXrVrWmrBrowserTestWebXrDisabled,
WebXrVrWmrBrowserTestWebXrDisabled,
WebXrVrOpenXrBrowserTestWebXrDisabled, WebXrVrOpenXrBrowserTestWebXrDisabled,
WebXrVrBrowserTestBase, WebXrVrBrowserTestBase,
TestWebXrDisabledWithoutFlagSet) { TestWebXrDisabledWithoutFlagSet) {
#else #else
IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(WebXrVrOpenVrBrowserTestWebXrDisabled, IN_PROC_MULTI_CLASS_BROWSER_TEST_F1(WebXrVrWmrBrowserTestWebXrDisabled,
WebXrVrWmrBrowserTestWebXrDisabled,
WebXrVrBrowserTestBase, WebXrVrBrowserTestBase,
TestWebXrDisabledWithoutFlagSet) { TestWebXrDisabledWithoutFlagSet) {
#endif // BUILDFLAG(ENABLE_OPENXR) #endif // BUILDFLAG(ENABLE_OPENXR)
......
...@@ -914,8 +914,6 @@ const char kWebXrRuntimeNone[] = "no-vr-runtime"; ...@@ -914,8 +914,6 @@ const char kWebXrRuntimeNone[] = "no-vr-runtime";
const char kWebXrRuntimeOrientationSensors[] = "orientation-sensors"; const char kWebXrRuntimeOrientationSensors[] = "orientation-sensors";
// The following are the runtimes that WebXr supports. // The following are the runtimes that WebXr supports.
const char kWebXrRuntimeOculus[] = "oculus";
const char kWebXrRuntimeOpenVr[] = "openvr";
const char kWebXrRuntimeOpenXr[] = "openxr"; const char kWebXrRuntimeOpenXr[] = "openxr";
const char kWebXrRuntimeWMR[] = "windows-mixed-reality"; const char kWebXrRuntimeWMR[] = "windows-mixed-reality";
......
...@@ -248,8 +248,6 @@ CONTENT_EXPORT extern const char kDisableScrollToTextFragment[]; ...@@ -248,8 +248,6 @@ CONTENT_EXPORT extern const char kDisableScrollToTextFragment[];
CONTENT_EXPORT extern const char kWebXrForceRuntime[]; CONTENT_EXPORT extern const char kWebXrForceRuntime[];
CONTENT_EXPORT extern const char kWebXrRuntimeNone[]; CONTENT_EXPORT extern const char kWebXrRuntimeNone[];
CONTENT_EXPORT extern const char kWebXrRuntimeOrientationSensors[]; CONTENT_EXPORT extern const char kWebXrRuntimeOrientationSensors[];
CONTENT_EXPORT extern const char kWebXrRuntimeOculus[];
CONTENT_EXPORT extern const char kWebXrRuntimeOpenVr[];
CONTENT_EXPORT extern const char kWebXrRuntimeOpenXr[]; CONTENT_EXPORT extern const char kWebXrRuntimeOpenXr[];
CONTENT_EXPORT extern const char kWebXrRuntimeWMR[]; CONTENT_EXPORT extern const char kWebXrRuntimeWMR[];
......
...@@ -12,14 +12,6 @@ ...@@ -12,14 +12,6 @@
#include "device/base/features.h" #include "device/base/features.h"
#include "device/vr/buildflags/buildflags.h" #include "device/vr/buildflags/buildflags.h"
#if BUILDFLAG(ENABLE_OPENVR)
#include "device/vr/openvr/openvr_device.h"
#endif
#if BUILDFLAG(ENABLE_OCULUS_VR)
#include "device/vr/oculus/oculus_device.h"
#endif
#if BUILDFLAG(ENABLE_WINDOWS_MR) #if BUILDFLAG(ENABLE_WINDOWS_MR)
#include "device/vr/windows_mixed_reality/mixed_reality_device.h" #include "device/vr/windows_mixed_reality/mixed_reality_device.h"
#include "device/vr/windows_mixed_reality/mixed_reality_statics.h" #include "device/vr/windows_mixed_reality/mixed_reality_statics.h"
...@@ -128,24 +120,6 @@ void IsolatedXRRuntimeProvider::PollForDeviceChanges() { ...@@ -128,24 +120,6 @@ void IsolatedXRRuntimeProvider::PollForDeviceChanges() {
} }
#endif #endif
#if BUILDFLAG(ENABLE_OCULUS_VR)
if (!preferred_device_enabled && IsOculusVrHardwareAvailable()) {
SetOculusVrRuntimeStatus(RuntimeStatus::kEnable);
preferred_device_enabled = true;
} else {
SetOculusVrRuntimeStatus(RuntimeStatus::kDisable);
}
#endif
#if BUILDFLAG(ENABLE_OPENVR)
if (!preferred_device_enabled && IsOpenVrHardwareAvailable()) {
SetOpenVrRuntimeStatus(RuntimeStatus::kEnable);
preferred_device_enabled = true;
} else {
SetOpenVrRuntimeStatus(RuntimeStatus::kDisable);
}
#endif
// Schedule this function to run again later. // Schedule this function to run again later.
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, FROM_HERE,
...@@ -162,22 +136,6 @@ void IsolatedXRRuntimeProvider::SetupPollingForDeviceChanges() { ...@@ -162,22 +136,6 @@ void IsolatedXRRuntimeProvider::SetupPollingForDeviceChanges() {
// we'll get an error for 'command_line' being unused. // we'll get an error for 'command_line' being unused.
ALLOW_UNUSED_LOCAL(command_line); ALLOW_UNUSED_LOCAL(command_line);
#if BUILDFLAG(ENABLE_OCULUS_VR)
if (IsEnabled(command_line, device::features::kOculusVR,
switches::kWebXrRuntimeOculus)) {
should_check_oculus_ = device::OculusDevice::IsApiAvailable();
any_runtimes_available |= should_check_oculus_;
}
#endif
#if BUILDFLAG(ENABLE_OPENVR)
if (IsEnabled(command_line, device::features::kOpenVR,
switches::kWebXrRuntimeOpenVr)) {
should_check_openvr_ = device::OpenVRDevice::IsApiAvailable();
any_runtimes_available |= should_check_openvr_;
}
#endif
#if BUILDFLAG(ENABLE_WINDOWS_MR) #if BUILDFLAG(ENABLE_WINDOWS_MR)
if (IsEnabled(command_line, device::features::kWindowsMixedReality, if (IsEnabled(command_line, device::features::kWindowsMixedReality,
switches::kWebXrRuntimeWMR)) { switches::kWebXrRuntimeWMR)) {
...@@ -211,34 +169,6 @@ void IsolatedXRRuntimeProvider::RequestDevices( ...@@ -211,34 +169,6 @@ void IsolatedXRRuntimeProvider::RequestDevices(
client_->OnDevicesEnumerated(); client_->OnDevicesEnumerated();
} }
#if BUILDFLAG(ENABLE_OCULUS_VR)
bool IsolatedXRRuntimeProvider::IsOculusVrHardwareAvailable() {
return should_check_oculus_ &&
((oculus_device_ && oculus_device_->IsAvailable()) ||
device::OculusDevice::IsHwAvailable());
}
void IsolatedXRRuntimeProvider::SetOculusVrRuntimeStatus(RuntimeStatus status) {
SetRuntimeStatus(client_.get(), status,
base::BindOnce(&CreateDevice<device::OculusDevice>),
&oculus_device_);
}
#endif // BUILDFLAG(ENABLE_OCULUS_VR)
#if BUILDFLAG(ENABLE_OPENVR)
bool IsolatedXRRuntimeProvider::IsOpenVrHardwareAvailable() {
return should_check_openvr_ &&
((openvr_device_ && openvr_device_->IsAvailable()) ||
device::OpenVRDevice::IsHwAvailable());
}
void IsolatedXRRuntimeProvider::SetOpenVrRuntimeStatus(RuntimeStatus status) {
SetRuntimeStatus(client_.get(), status,
base::BindOnce(&CreateDevice<device::OpenVRDevice>),
&openvr_device_);
}
#endif // BUILDFLAG(ENABLE_OPENVR)
#if BUILDFLAG(ENABLE_WINDOWS_MR) #if BUILDFLAG(ENABLE_WINDOWS_MR)
bool IsolatedXRRuntimeProvider::IsWMRHardwareAvailable() { bool IsolatedXRRuntimeProvider::IsWMRHardwareAvailable() {
return should_check_wmr_ && wmr_statics_->IsHardwareAvailable(); return should_check_wmr_ && wmr_statics_->IsHardwareAvailable();
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
#include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/remote.h"
namespace device { namespace device {
class OculusDevice;
class OpenVRDevice;
class MixedRealityDevice; class MixedRealityDevice;
class MixedRealityDeviceStatics; class MixedRealityDeviceStatics;
class OpenXrDevice; class OpenXrDevice;
...@@ -37,20 +35,6 @@ class IsolatedXRRuntimeProvider ...@@ -37,20 +35,6 @@ class IsolatedXRRuntimeProvider
void PollForDeviceChanges(); void PollForDeviceChanges();
void SetupPollingForDeviceChanges(); void SetupPollingForDeviceChanges();
#if BUILDFLAG(ENABLE_OCULUS_VR)
bool IsOculusVrHardwareAvailable();
void SetOculusVrRuntimeStatus(RuntimeStatus status);
bool should_check_oculus_ = false;
std::unique_ptr<device::OculusDevice> oculus_device_;
#endif
#if BUILDFLAG(ENABLE_OPENVR)
bool IsOpenVrHardwareAvailable();
void SetOpenVrRuntimeStatus(RuntimeStatus status);
bool should_check_openvr_ = false;
std::unique_ptr<device::OpenVRDevice> openvr_device_;
#endif
#if BUILDFLAG(ENABLE_WINDOWS_MR) #if BUILDFLAG(ENABLE_WINDOWS_MR)
bool IsWMRHardwareAvailable(); bool IsWMRHardwareAvailable();
void SetWMRRuntimeStatus(RuntimeStatus status); void SetWMRRuntimeStatus(RuntimeStatus status);
......
...@@ -39,16 +39,6 @@ const base::Feature kWebXrOrientationSensorDevice { ...@@ -39,16 +39,6 @@ const base::Feature kWebXrOrientationSensorDevice {
}; };
#endif // BUILDFLAG(ENABLE_VR) #endif // BUILDFLAG(ENABLE_VR)
namespace features { namespace features {
#if BUILDFLAG(ENABLE_OCULUS_VR)
// Controls WebXR support for the Oculus Runtime.
const base::Feature kOculusVR{"OculusVR", base::FEATURE_DISABLED_BY_DEFAULT};
#endif // ENABLE_OCULUS_VR
#if BUILDFLAG(ENABLE_OPENVR)
// Controls WebXR support for the OpenVR Runtime.
const base::Feature kOpenVR{"OpenVR", base::FEATURE_DISABLED_BY_DEFAULT};
#endif // ENABLE_OPENVR
#if BUILDFLAG(ENABLE_OPENXR) #if BUILDFLAG(ENABLE_OPENXR)
// Controls WebXR support for the OpenXR Runtime. // Controls WebXR support for the OpenXR Runtime.
const base::Feature kOpenXR{"OpenXR", base::FEATURE_ENABLED_BY_DEFAULT}; const base::Feature kOpenXR{"OpenXR", base::FEATURE_ENABLED_BY_DEFAULT};
......
...@@ -28,12 +28,6 @@ DEVICE_BASE_EXPORT extern const base::Feature kWebXrOrientationSensorDevice; ...@@ -28,12 +28,6 @@ DEVICE_BASE_EXPORT extern const base::Feature kWebXrOrientationSensorDevice;
// New features should be added to the device::features namespace. // New features should be added to the device::features namespace.
namespace features { namespace features {
#if BUILDFLAG(ENABLE_OCULUS_VR)
DEVICE_BASE_EXPORT extern const base::Feature kOculusVR;
#endif // ENABLE_OCULUS_VR
#if BUILDFLAG(ENABLE_OPENVR)
DEVICE_BASE_EXPORT extern const base::Feature kOpenVR;
#endif // ENABLE_OPENVR
#if BUILDFLAG(ENABLE_OPENXR) #if BUILDFLAG(ENABLE_OPENXR)
DEVICE_BASE_EXPORT extern const base::Feature kOpenXR; DEVICE_BASE_EXPORT extern const base::Feature kOpenXR;
#endif // ENABLE_OPENXR #endif // ENABLE_OPENXR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment