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/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "device/vr/vr_export.h" | 10 #include "device/vr/vr_export.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 unsigned int id() const { return id_; } | 24 unsigned int id() const { return id_; } |
25 | 25 |
26 virtual mojom::VRDisplayInfoPtr GetVRDevice() = 0; | 26 virtual mojom::VRDisplayInfoPtr GetVRDevice() = 0; |
27 virtual mojom::VRPosePtr GetPose() = 0; | 27 virtual mojom::VRPosePtr GetPose() = 0; |
28 virtual void ResetPose() = 0; | 28 virtual void ResetPose() = 0; |
29 | 29 |
30 virtual void RequestPresent(const base::Callback<void(bool)>& callback) = 0; | 30 virtual void RequestPresent(const base::Callback<void(bool)>& callback) = 0; |
31 virtual void SetSecureOrigin(bool secure_origin) = 0; | 31 virtual void SetSecureOrigin(bool secure_origin) = 0; |
32 virtual void ExitPresent() = 0; | 32 virtual void ExitPresent() = 0; |
33 virtual void SubmitFrame(mojom::VRPosePtr pose) = 0; | 33 virtual void SubmitFrame(mojom::VRPosePtr pose) = 0; |
34 virtual void UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds, | 34 virtual void UpdateLayerBounds(uint32_t frame_index, |
| 35 mojom::VRLayerBoundsPtr left_bounds, |
35 mojom::VRLayerBoundsPtr right_bounds) = 0; | 36 mojom::VRLayerBoundsPtr right_bounds) = 0; |
36 | 37 |
37 virtual void AddDisplay(VRDisplayImpl* display); | 38 virtual void AddDisplay(VRDisplayImpl* display); |
38 virtual void RemoveDisplay(VRDisplayImpl* display); | 39 virtual void RemoveDisplay(VRDisplayImpl* display); |
39 | 40 |
40 virtual bool IsAccessAllowed(VRDisplayImpl* display); | 41 virtual bool IsAccessAllowed(VRDisplayImpl* display); |
41 virtual bool CheckPresentingDisplay(VRDisplayImpl* display); | 42 virtual bool CheckPresentingDisplay(VRDisplayImpl* display); |
42 | 43 |
43 virtual void OnChanged(); | 44 virtual void OnChanged(); |
44 virtual void OnExitPresent(); | 45 virtual void OnExitPresent(); |
(...skipping 16 matching lines...) Expand all Loading... |
61 unsigned int id_; | 62 unsigned int id_; |
62 | 63 |
63 static unsigned int next_id_; | 64 static unsigned int next_id_; |
64 | 65 |
65 DISALLOW_COPY_AND_ASSIGN(VRDevice); | 66 DISALLOW_COPY_AND_ASSIGN(VRDevice); |
66 }; | 67 }; |
67 | 68 |
68 } // namespace device | 69 } // namespace device |
69 | 70 |
70 #endif // DEVICE_VR_VR_DEVICE_H | 71 #endif // DEVICE_VR_VR_DEVICE_H |
OLD | NEW |