Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Side by Side Diff: device/vr/test/fake_vr_device.cc

Issue 2624633002: Remove Sync GetPose VRService call, implement VRVSyncProvider (Closed)
Patch Set: oops Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/vr/test/fake_vr_device.h ('k') | device/vr/vr_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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();
11 pose_ = mojom::VRPose::New();
12 11
13 InitBasicDevice(); 12 InitBasicDevice();
14 } 13 }
15 14
16 FakeVRDevice::~FakeVRDevice() {} 15 FakeVRDevice::~FakeVRDevice() {}
17 16
18 void FakeVRDevice::InitBasicDevice() { 17 void FakeVRDevice::InitBasicDevice() {
19 device_->index = id(); 18 device_->index = id();
20 device_->displayName = "FakeVRDevice"; 19 device_->displayName = "FakeVRDevice";
21 20
(...skipping 26 matching lines...) Expand all
48 eye->renderWidth = size; 47 eye->renderWidth = size;
49 eye->renderHeight = size; 48 eye->renderHeight = size;
50 49
51 return eye; 50 return eye;
52 } 51 }
53 52
54 void FakeVRDevice::SetVRDevice(const mojom::VRDisplayInfoPtr& device) { 53 void FakeVRDevice::SetVRDevice(const mojom::VRDisplayInfoPtr& device) {
55 device_ = device.Clone(); 54 device_ = device.Clone();
56 } 55 }
57 56
58 void FakeVRDevice::SetPose(const mojom::VRPosePtr& pose) {
59 pose_ = pose.Clone();
60 }
61
62 mojom::VRDisplayInfoPtr FakeVRDevice::GetVRDevice() { 57 mojom::VRDisplayInfoPtr FakeVRDevice::GetVRDevice() {
63 mojom::VRDisplayInfoPtr display = device_.Clone(); 58 mojom::VRDisplayInfoPtr display = device_.Clone();
64 return display.Clone(); 59 return display.Clone();
65 } 60 }
66 61
67 mojom::VRPosePtr FakeVRDevice::GetPose() {
68 return pose_.Clone();
69 }
70
71 void FakeVRDevice::ResetPose() {} 62 void FakeVRDevice::ResetPose() {}
72 63
73 void FakeVRDevice::RequestPresent(const base::Callback<void(bool)>& callback) { 64 void FakeVRDevice::RequestPresent(const base::Callback<void(bool)>& callback) {
74 callback.Run(true); 65 callback.Run(true);
75 } 66 }
76 67
77 void FakeVRDevice::SetSecureOrigin(bool secure_origin) {} 68 void FakeVRDevice::SetSecureOrigin(bool secure_origin) {}
78 69
79 void FakeVRDevice::ExitPresent() { 70 void FakeVRDevice::ExitPresent() {
80 OnExitPresent(); 71 OnExitPresent();
81 } 72 }
82 73
83 void FakeVRDevice::SubmitFrame(mojom::VRPosePtr pose) {} 74 void FakeVRDevice::SubmitFrame(mojom::VRPosePtr pose) {}
84 75
85 void FakeVRDevice::UpdateLayerBounds(mojom::VRLayerBoundsPtr leftBounds, 76 void FakeVRDevice::UpdateLayerBounds(mojom::VRLayerBoundsPtr leftBounds,
86 mojom::VRLayerBoundsPtr rightBounds) {} 77 mojom::VRLayerBoundsPtr rightBounds) {}
87 78
79 void FakeVRDevice::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) {}
80
88 } // namespace device 81 } // namespace device
OLDNEW
« no previous file with comments | « device/vr/test/fake_vr_device.h ('k') | device/vr/vr_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698