Index: device/vr/vr_device.h |
diff --git a/device/vr/vr_device.h b/device/vr/vr_device.h |
index cefbe65dc94d10a906dc96c27956d9bbf8fca015..93c9aa0377736c138e96a0009b6263367a026757 100644 |
--- a/device/vr/vr_device.h |
+++ b/device/vr/vr_device.h |
@@ -13,7 +13,6 @@ |
namespace device { |
class VRDisplayImpl; |
-class VRServiceImpl; |
const unsigned int VR_DEVICE_LAST_ID = 0xFFFFFFFF; |
@@ -35,13 +34,11 @@ class DEVICE_VR_EXPORT VRDevice { |
virtual void UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds, |
mojom::VRLayerBoundsPtr right_bounds) = 0; |
- virtual void AddService(VRServiceImpl* service); |
- virtual void RemoveService(VRServiceImpl* service); |
+ virtual void AddDisplay(VRDisplayImpl* display); |
+ virtual void RemoveDisplay(VRDisplayImpl* display); |
- // TODO(shaobo.yan@intel.com): Checks should be done against VRDisplayImpl and |
- // the name should be considered. |
- virtual bool IsAccessAllowed(VRServiceImpl* service); |
- virtual bool IsPresentingService(VRServiceImpl* service); |
+ virtual bool IsAccessAllowed(VRDisplayImpl* display); |
+ virtual bool CheckPresentingDisplay(VRDisplayImpl* display); |
virtual void OnChanged(); |
virtual void OnExitPresent(); |
@@ -54,18 +51,12 @@ class DEVICE_VR_EXPORT VRDevice { |
friend class VRDisplayImpl; |
friend class VRDisplayImplTest; |
- void SetPresentingService(VRServiceImpl* service); |
+ void SetPresentingDisplay(VRDisplayImpl* display); |
private: |
- // Each Service have one VRDisplay with one VRDevice. |
- // TODO(shaobo.yan@intel.com): Since the VRDisplayImpl knows its VRServiceImpl |
- // we should |
- // only need to store the VRDisplayImpl. |
- using DisplayClientMap = std::map<VRServiceImpl*, VRDisplayImpl*>; |
- DisplayClientMap displays_; |
- |
- // TODO(shaobo.yan@intel.com): Should track presenting VRDisplayImpl instead. |
- VRServiceImpl* presenting_service_; |
+ std::set<VRDisplayImpl*> displays_; |
+ |
+ VRDisplayImpl* presenting_display_; |
unsigned int id_; |