| 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 #include "device/vr/test/fake_vr_device.h" | 5 #include "device/vr/test/fake_vr_device.h" |
| 6 | 6 |
| 7 namespace device { | 7 namespace device { |
| 8 | 8 |
| 9 FakeVRDevice::FakeVRDevice() { | 9 FakeVRDevice::FakeVRDevice() { |
| 10 device_ = mojom::VRDisplayInfo::New(); | 10 device_ = mojom::VRDisplayInfo::New(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 void FakeVRDevice::SetPose(const mojom::VRPosePtr& pose) { | 57 void FakeVRDevice::SetPose(const mojom::VRPosePtr& pose) { |
| 58 pose_ = pose.Clone(); | 58 pose_ = pose.Clone(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 mojom::VRDisplayInfoPtr FakeVRDevice::GetVRDevice() { | 61 mojom::VRDisplayInfoPtr FakeVRDevice::GetVRDevice() { |
| 62 mojom::VRDisplayInfoPtr display = device_.Clone(); | 62 mojom::VRDisplayInfoPtr display = device_.Clone(); |
| 63 return display.Clone(); | 63 return display.Clone(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 mojom::VRPosePtr FakeVRDevice::GetPose(VRServiceImpl* service) { | 66 mojom::VRPosePtr FakeVRDevice::GetPose() { |
| 67 return pose_.Clone(); | 67 return pose_.Clone(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void FakeVRDevice::ResetPose(VRServiceImpl* service) {} | 70 void FakeVRDevice::ResetPose() {} |
| 71 | 71 |
| 72 // TODO(shaobo.yan@intel.com): Will implemenate for VRDeviceServiceImpl tests. | 72 // TODO(shaobo.yan@intel.com): Will implemenate for VRDeviceServiceImpl tests. |
| 73 bool FakeVRDevice::RequestPresent(VRServiceImpl* service, bool secure_origin) { | 73 bool FakeVRDevice::RequestPresent(bool secure_origin) { |
| 74 return true; | 74 return true; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void FakeVRDevice::ExitPresent(VRServiceImpl* service) {} | 77 void FakeVRDevice::ExitPresent() {} |
| 78 | 78 |
| 79 void FakeVRDevice::SubmitFrame(VRServiceImpl* service, mojom::VRPosePtr pose) {} | 79 void FakeVRDevice::SubmitFrame(mojom::VRPosePtr pose) {} |
| 80 | 80 |
| 81 void FakeVRDevice::UpdateLayerBounds(VRServiceImpl* service, | 81 void FakeVRDevice::UpdateLayerBounds(mojom::VRLayerBoundsPtr leftBounds, |
| 82 mojom::VRLayerBoundsPtr leftBounds, | |
| 83 mojom::VRLayerBoundsPtr rightBounds) {} | 82 mojom::VRLayerBoundsPtr rightBounds) {} |
| 84 | 83 |
| 85 } // namespace device | 84 } // namespace device |
| OLD | NEW |