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

Unified Diff: device/vr/vr_device.h

Issue 2537723002: Refine VRDevice Class (Closed)
Patch Set: Rebase Created 4 years 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/test/fake_vr_device.cc ('k') | device/vr/vr_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « device/vr/test/fake_vr_device.cc ('k') | device/vr/vr_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698