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

Unified Diff: device/vr/vr_device.h

Issue 2746233002: Fixes 2D-to-WebVR site transitions when browsing in VR. (Closed)
Patch Set: nit 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
Index: device/vr/vr_device.h
diff --git a/device/vr/vr_device.h b/device/vr/vr_device.h
index be836ee12016272cdbcb11abc704cd63380d2396..982b15c060f449e1bbd7c32e1780ae6a9842c9cc 100644
--- a/device/vr/vr_device.h
+++ b/device/vr/vr_device.h
@@ -16,6 +16,8 @@ class VRDisplayImpl;
const unsigned int VR_DEVICE_LAST_ID = 0xFFFFFFFF;
+// Represents one of the platform's VR devices. Owned by the respective
+// VRDeviceProvider.
class DEVICE_VR_EXPORT VRDevice {
public:
VRDevice();
@@ -23,8 +25,11 @@ class DEVICE_VR_EXPORT VRDevice {
unsigned int id() const { return id_; }
- virtual void GetVRDevice(
- const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback) = 0;
+ // Queries VR device for display info and calls onCreated once the display
+ // info object is created. If the query fails onCreated will be called with a
+ // nullptr as argument. onCreated can be called before this function returns.
+ virtual void CreateVRDisplayInfo(
+ const base::Callback<void(mojom::VRDisplayInfoPtr)>& onCreated) = 0;
virtual void ResetPose() = 0;
virtual void RequestPresent(const base::Callback<void(bool)>& callback) = 0;

Powered by Google App Engine
This is Rietveld 408576698