OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ANDROID_GVR_DEVICE_H | 5 #ifndef DEVICE_VR_ANDROID_GVR_DEVICE_H |
6 #define DEVICE_VR_ANDROID_GVR_DEVICE_H | 6 #define DEVICE_VR_ANDROID_GVR_DEVICE_H |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "device/vr/vr_device.h" | 9 #include "device/vr/vr_device.h" |
10 | 10 |
11 namespace device { | 11 namespace device { |
12 | 12 |
13 class GvrDelegate; | 13 class GvrDelegate; |
14 | 14 |
15 class GvrDevice : public VRDevice { | 15 class GvrDevice : public VRDevice { |
16 public: | 16 public: |
17 GvrDevice(VRDeviceProvider* provider, GvrDelegate* delegate); | 17 GvrDevice(VRDeviceProvider* provider, GvrDelegate* delegate); |
18 ~GvrDevice() override; | 18 ~GvrDevice() override; |
19 | 19 |
20 // VRDevice | 20 // VRDevice |
21 VRDisplayPtr GetVRDevice() override; | 21 VRDisplayPtr GetVRDevice() override; |
22 VRPosePtr GetPose() override; | 22 VRPosePtr GetPose() override; |
23 void ResetPose() override; | 23 void ResetPose() override; |
24 | 24 |
25 void RequestPresent() override; | 25 bool RequestPresent() override; |
26 void ExitPresent() override; | 26 void ExitPresent() override; |
27 | 27 |
28 void SubmitFrame() override; | 28 void SubmitFrame(VRPosePtr pose) override; |
29 void UpdateLayerBounds(VRLayerBoundsPtr leftBounds, | 29 void UpdateLayerBounds(VRLayerBoundsPtr leftBounds, |
30 VRLayerBoundsPtr rightBounds) override; | 30 VRLayerBoundsPtr rightBounds) override; |
31 | 31 |
32 private: | 32 private: |
33 GvrDelegate* delegate_; | 33 GvrDelegate* delegate_; |
34 | 34 |
35 DISALLOW_COPY_AND_ASSIGN(GvrDevice); | 35 DISALLOW_COPY_AND_ASSIGN(GvrDevice); |
36 }; | 36 }; |
37 | 37 |
38 } // namespace device | 38 } // namespace device |
39 | 39 |
40 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_H | 40 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_H |
OLD | NEW |