Commit 14d631ca authored by Bill Orr's avatar Bill Orr Committed by Commit Bot

Enable OpenVR devices behind a runtime flag on Windows

BUG=782445

Change-Id: Iec695a4db2bf2851f8f23b2c8ab1568a5bbfa588
Reviewed-on: https://chromium-review.googlesource.com/757859Reviewed-by: default avatarBrandon Jones <bajones@chromium.org>
Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Reviewed-by: default avatarDavid Dorwin <ddorwin@chromium.org>
Commit-Queue: Bill Orr <billorr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517684}
parent 262a9e7b
......@@ -2199,6 +2199,11 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kWebVrAutopresentFromIntentDescription, kOsAndroid,
FEATURE_VALUE_TYPE(chrome::android::kWebVrAutopresentFromIntent)},
#endif // OS_ANDROID
#if BUILDFLAG(ENABLE_OPENVR)
{"openvr", flag_descriptions::kOpenVRName,
flag_descriptions::kOpenVRDescription, kOsWin,
FEATURE_VALUE_TYPE(features::kOpenVR)},
#endif // ENABLE_OPENVR
#endif // ENABLE_VR
#if defined(OS_CHROMEOS)
{"disable-accelerated-mjpeg-decode",
......
......@@ -2748,6 +2748,12 @@ const char kWebVrAutopresentFromIntentDescription[] =
#endif // OS_ANDROID
#if BUILDFLAG(ENABLE_OPENVR)
const char kOpenVRName[] = "OpenVR hardware support";
const char kOpenVRDescription[] =
"If enabled, Chrome will use OpenVR devices for VR.";
#endif // ENABLE_OPENVR
#endif // ENABLE_VR
#if BUILDFLAG(ENABLE_NACL)
......
......@@ -1699,6 +1699,11 @@ extern const char kWebVrAutopresentFromIntentDescription[];
#endif // OS_ANDROID
#if BUILDFLAG(ENABLE_OPENVR)
extern const char kOpenVRName[];
extern const char kOpenVRDescription[];
#endif // ENABLE_OPENVR
#endif // ENABLE_VR
#if BUILDFLAG(ENABLE_NACL)
......
......@@ -10,6 +10,7 @@
#include "base/memory/ptr_util.h"
#include "base/memory/singleton.h"
#include "build/build_config.h"
#include "chrome/common/chrome_features.h"
#include "device/vr/features/features.h"
#if defined(OS_ANDROID)
......@@ -35,7 +36,8 @@ VRDeviceManager* VRDeviceManager::GetInstance() {
#endif
#if BUILDFLAG(ENABLE_OPENVR)
providers.emplace_back(std::make_unique<device::OpenVRDeviceProvider>());
if (base::FeatureList::IsEnabled(features::kOpenVR))
providers.emplace_back(std::make_unique<device::OpenVRDeviceProvider>());
#endif
new VRDeviceManager(std::move(providers));
}
......
......@@ -238,6 +238,12 @@ const base::Feature kVrBrowsingExperimentalFeatures{
// Controls experimental rendering features for VR browsing.
const base::Feature kVrBrowsingExperimentalRendering{
"VrBrowsingExperimentalRendering", base::FEATURE_DISABLED_BY_DEFAULT};
#if BUILDFLAG(ENABLE_OPENVR)
// Controls OpenVR support.
const base::Feature kOpenVR{"OpenVR", base::FEATURE_DISABLED_BY_DEFAULT};
#endif // ENABLE_OPENVR
#endif // BUILDFLAG(ENABLE_VR)
#if defined(OS_WIN)
......
......@@ -121,7 +121,12 @@ extern const base::Feature kVrBrowsing;
extern const base::Feature kVrBrowserKeyboard;
extern const base::Feature kVrBrowsingExperimentalFeatures;
extern const base::Feature kVrBrowsingExperimentalRendering;
#endif
#if BUILDFLAG(ENABLE_OPENVR)
extern const base::Feature kOpenVR;
#endif // ENABLE_OPENVR
#endif // ENABLE_VR
#if defined(OS_MACOSX)
extern const base::Feature kFullscreenToolbarReveal;
......
......@@ -70,6 +70,7 @@ if (enable_vr) {
if (enable_openvr) {
deps += [
"//device/gamepad",
"//device/gamepad/public/cpp:shared_with_blink",
"//third_party/openvr:openvr",
]
sources += [
......
......@@ -9,13 +9,12 @@ declare_args() {
# support arm and arm64.
enable_gvr_services = is_android && !is_chromecast &&
(current_cpu == "arm" || current_cpu == "arm64")
enable_openvr = false
enable_openvr = is_win
}
declare_args() {
# Enable VR device support whenever VR device SDK(s) are supported and
# on Windows for testing.
enable_vr = enable_gvr_services || enable_openvr || is_win
# Enable VR device support whenever VR device SDK(s) are supported.
enable_vr = enable_gvr_services || enable_openvr
# Whether to include VR extras like test APKs in non-VR-specific targets
include_vr_data = false
......
......@@ -24553,6 +24553,7 @@ from previous Chrome versions.
<int value="-1302904242" label="enable-navigation-tracing"/>
<int value="-1294050129" label="ContentFullscreen:disabled"/>
<int value="-1289678848" label="SystemDownloadManager:enabled"/>
<int value="-1288130734" label="OpenVR:disabled"/>
<int value="-1285021473" label="save-page-as-mhtml"/>
<int value="-1284637134" label="pull-to-refresh"/>
<int value="-1276912933" label="enable-quick-unlock-pin"/>
......@@ -25705,6 +25706,7 @@ from previous Chrome versions.
<int value="1928407249" label="NewPhotoPicker:enabled"/>
<int value="1930901873" label="disable-sync-app-list"/>
<int value="1931309368" label="fill-on-account-select:disabled"/>
<int value="1932732886" label="OpenVR:enabled"/>
<int value="1936810062" label="WebVrVsyncAlign:enabled"/>
<int value="1939413645" label="enable-invalid-cert-collection"/>
<int value="1942911276" label="enable-grouped-history"/>
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