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_TEST_FAKE_VR_DEVICE_H_ | 5 #ifndef DEVICE_VR_TEST_FAKE_VR_DEVICE_H_ |
6 #define DEVICE_VR_TEST_FAKE_VR_DEVICE_H_ | 6 #define DEVICE_VR_TEST_FAKE_VR_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 #include "device/vr/vr_device_provider.h" | 10 #include "device/vr/vr_device_provider.h" |
11 | 11 |
12 namespace device { | 12 namespace device { |
13 | 13 |
14 class FakeVRDevice : public VRDevice { | 14 class FakeVRDevice : public VRDevice { |
15 public: | 15 public: |
16 explicit FakeVRDevice(VRDeviceProvider* provider); | 16 explicit FakeVRDevice(VRDeviceProvider* provider); |
17 ~FakeVRDevice() override; | 17 ~FakeVRDevice() override; |
18 | 18 |
| 19 void InitBasicDevice(); |
| 20 |
19 void SetVRDevice(const VRDisplayPtr& device); | 21 void SetVRDevice(const VRDisplayPtr& device); |
20 void SetPose(const VRPosePtr& state); | 22 void SetPose(const VRPosePtr& state); |
21 | 23 |
22 VRDisplayPtr GetVRDevice() override; | 24 VRDisplayPtr GetVRDevice() override; |
23 VRPosePtr GetPose() override; | 25 VRPosePtr GetPose() override; |
24 void ResetPose() override; | 26 void ResetPose() override; |
25 | 27 |
26 private: | 28 private: |
| 29 VREyeParametersPtr InitEye(float fov, float offset, uint32_t size); |
| 30 |
27 VRDisplayPtr device_; | 31 VRDisplayPtr device_; |
28 VRPosePtr pose_; | 32 VRPosePtr pose_; |
29 | 33 |
30 DISALLOW_COPY_AND_ASSIGN(FakeVRDevice); | 34 DISALLOW_COPY_AND_ASSIGN(FakeVRDevice); |
31 }; | 35 }; |
32 | 36 |
33 } // namespace device | 37 } // namespace device |
34 | 38 |
35 #endif // DEVICE_VR_TEST_FAKE_VR_DEVICE_H_ | 39 #endif // DEVICE_VR_TEST_FAKE_VR_DEVICE_H_ |
OLD | NEW |