| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 } | 55 } |
| 56 | 56 |
| 57 void FakeVRDevice::GetVRDevice( | 57 void FakeVRDevice::GetVRDevice( |
| 58 const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback) { | 58 const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback) { |
| 59 mojom::VRDisplayInfoPtr display = device_.Clone(); | 59 mojom::VRDisplayInfoPtr display = device_.Clone(); |
| 60 callback.Run(std::move(display)); | 60 callback.Run(std::move(display)); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void FakeVRDevice::ResetPose() {} | 63 void FakeVRDevice::ResetPose() {} |
| 64 | 64 |
| 65 void FakeVRDevice::RequestPresent(const base::Callback<void(bool)>& callback) { | 65 void FakeVRDevice::RequestPresent(mojom::VRSubmitFrameClientPtr submit_client, |
| 66 const base::Callback<void(bool)>& callback) { |
| 66 callback.Run(true); | 67 callback.Run(true); |
| 67 } | 68 } |
| 68 | 69 |
| 69 void FakeVRDevice::SetSecureOrigin(bool secure_origin) {} | 70 void FakeVRDevice::SetSecureOrigin(bool secure_origin) {} |
| 70 | 71 |
| 71 void FakeVRDevice::ExitPresent() { | 72 void FakeVRDevice::ExitPresent() { |
| 72 OnExitPresent(); | 73 OnExitPresent(); |
| 73 } | 74 } |
| 74 | 75 |
| 75 void FakeVRDevice::SubmitFrame(mojom::VRPosePtr pose) {} | 76 void FakeVRDevice::SubmitFrame(int16_t frame_index, |
| 77 const gpu::MailboxHolder& mailbox) {} |
| 76 | 78 |
| 77 void FakeVRDevice::UpdateLayerBounds(int16_t frame_index, | 79 void FakeVRDevice::UpdateLayerBounds(int16_t frame_index, |
| 78 mojom::VRLayerBoundsPtr leftBounds, | 80 mojom::VRLayerBoundsPtr leftBounds, |
| 79 mojom::VRLayerBoundsPtr rightBounds) {} | 81 mojom::VRLayerBoundsPtr rightBounds, |
| 82 int16_t source_width, |
| 83 int16_t source_height) {} |
| 80 | 84 |
| 81 void FakeVRDevice::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) {} | 85 void FakeVRDevice::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) {} |
| 82 | 86 |
| 83 } // namespace device | 87 } // namespace device |
| OLD | NEW |