Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2635293002: Ensure navigator.getVRDisplays always resolves. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/BUILD.gn ('k') | third_party/WebKit/LayoutTests/vr/getVRDisplays_always_resolves.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 71cef3aef966401e1f8d4489468b8d8a6be16cac..5209ceeb3ed37db089e4cb37a84c22701a3b0a85 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -126,9 +126,7 @@
#include "content/public/browser/provision_fetcher_impl.h"
#endif
-#if defined(ENABLE_WEBVR)
#include "device/vr/vr_service_impl.h" // nogncheck
-#endif
using base::TimeDelta;
@@ -240,6 +238,11 @@ class RemoterFactoryImpl final : public media::mojom::RemoterFactory {
};
#endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
+template <typename Interface>
+void IgnoreInterfaceRequest(mojo::InterfaceRequest<Interface> request) {
+ // Intentionally ignore the interface request.
+}
+
} // namespace
// static
@@ -2274,7 +2277,11 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
#if defined(ENABLE_WEBVR)
GetInterfaceRegistry()->AddInterface<device::mojom::VRService>(
base::Bind(&device::VRServiceImpl::BindRequest));
+#else
+ GetInterfaceRegistry()->AddInterface<device::mojom::VRService>(
+ base::Bind(&IgnoreInterfaceRequest<device::mojom::VRService>));
#endif
+
if (base::FeatureList::IsEnabled(features::kGenericSensor)) {
GetInterfaceRegistry()->AddInterface(
base::Bind(&device::SensorProviderImpl::Create,
« no previous file with comments | « content/browser/BUILD.gn ('k') | third_party/WebKit/LayoutTests/vr/getVRDisplays_always_resolves.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698