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

Unified Diff: device/vr/vr_display_impl.h

Issue 2746233002: Fixes 2D-to-WebVR site transitions when browsing in VR. (Closed)
Patch Set: Fixed export Created 3 years, 9 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 | « device/vr/vr_device_manager_unittest.cc ('k') | device/vr/vr_display_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_display_impl.h
diff --git a/device/vr/vr_display_impl.h b/device/vr/vr_display_impl.h
index bf0b7ab128e9554b26280e7caec6557c5478a2e9..0502fa30f047c3eb8ac08fd658cd2dda43e469f5 100644
--- a/device/vr/vr_display_impl.h
+++ b/device/vr/vr_display_impl.h
@@ -18,12 +18,25 @@ namespace device {
class VRServiceImpl;
+// Browser process representation of a VRDevice within a WebVR site session
+// (see VRServiceImpl). VRDisplayImpl receives/sends VR device events
+// from/to mojom::VRDisplayClient (the render process representation of a VR
+// device).
+// VRDisplayImpl objects are owned by their respective VRServiceImpl instances.
class VRDisplayImpl : public mojom::VRDisplay {
public:
- VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service);
+ VRDisplayImpl(device::VRDevice* device,
+ VRServiceImpl* service,
+ mojom::VRServiceClient* service_client,
+ mojom::VRDisplayInfoPtr display_info);
~VRDisplayImpl() override;
- mojom::VRDisplayClient* client() { return client_.get(); }
+ virtual void OnChanged(mojom::VRDisplayInfoPtr vr_device_info);
+ virtual void OnExitPresent();
+ virtual void OnBlur();
+ virtual void OnFocus();
+ virtual void OnActivate(mojom::VRDisplayEventReason reason);
+ virtual void OnDeactivate(mojom::VRDisplayEventReason reason);
private:
friend class VRDisplayImplTest;
@@ -49,8 +62,6 @@ class VRDisplayImpl : public mojom::VRDisplay {
bool secure_origin,
bool success);
- void OnVRDisplayInfoCreated(mojom::VRDisplayInfoPtr display_info);
-
mojo::Binding<mojom::VRDisplay> binding_;
mojom::VRDisplayClientPtr client_;
device::VRDevice* device_;
« no previous file with comments | « device/vr/vr_device_manager_unittest.cc ('k') | device/vr/vr_display_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698