| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DEVICE_VR_VR_DEVICE_H | 5 #ifndef DEVICE_VR_VR_DEVICE_H |
| 6 #define DEVICE_VR_VR_DEVICE_H | 6 #define DEVICE_VR_VR_DEVICE_H |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "device/vr/vr_export.h" | 9 #include "device/vr/vr_export.h" |
| 10 #include "device/vr/vr_service.mojom.h" | 10 #include "device/vr/vr_service.mojom.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 public: | 28 public: |
| 29 VRDevice(); | 29 VRDevice(); |
| 30 virtual ~VRDevice(); | 30 virtual ~VRDevice(); |
| 31 | 31 |
| 32 unsigned int id() const { return id_; } | 32 unsigned int id() const { return id_; } |
| 33 | 33 |
| 34 virtual mojom::VRDisplayInfoPtr GetVRDevice() = 0; | 34 virtual mojom::VRDisplayInfoPtr GetVRDevice() = 0; |
| 35 virtual mojom::VRPosePtr GetPose() = 0; | 35 virtual mojom::VRPosePtr GetPose() = 0; |
| 36 virtual void ResetPose() = 0; | 36 virtual void ResetPose() = 0; |
| 37 | 37 |
| 38 virtual bool RequestPresent(bool secure_origin) = 0; | 38 virtual void RequestPresent(const base::Callback<void(bool)>& callback) = 0; |
| 39 virtual void SetSecureOrigin(bool secure_origin) = 0; |
| 39 virtual void ExitPresent() = 0; | 40 virtual void ExitPresent() = 0; |
| 40 virtual void SubmitFrame(mojom::VRPosePtr pose) = 0; | 41 virtual void SubmitFrame(mojom::VRPosePtr pose) = 0; |
| 41 virtual void UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds, | 42 virtual void UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds, |
| 42 mojom::VRLayerBoundsPtr right_bounds) = 0; | 43 mojom::VRLayerBoundsPtr right_bounds) = 0; |
| 43 | 44 |
| 44 virtual void AddService(VRServiceImpl* service); | 45 virtual void AddService(VRServiceImpl* service); |
| 45 virtual void RemoveService(VRServiceImpl* service); | 46 virtual void RemoveService(VRServiceImpl* service); |
| 46 | 47 |
| 47 // TODO(shaobo.yan@intel.com): Checks should be done against VRDisplayImpl and | 48 // TODO(shaobo.yan@intel.com): Checks should be done against VRDisplayImpl and |
| 48 // the name should be considered. | 49 // the name should be considered. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 75 unsigned int id_; | 76 unsigned int id_; |
| 76 | 77 |
| 77 static unsigned int next_id_; | 78 static unsigned int next_id_; |
| 78 | 79 |
| 79 DISALLOW_COPY_AND_ASSIGN(VRDevice); | 80 DISALLOW_COPY_AND_ASSIGN(VRDevice); |
| 80 }; | 81 }; |
| 81 | 82 |
| 82 } // namespace device | 83 } // namespace device |
| 83 | 84 |
| 84 #endif // DEVICE_VR_VR_DEVICE_H | 85 #endif // DEVICE_VR_VR_DEVICE_H |
| OLD | NEW |