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

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

Issue 2510873003: Clean up WebVR RequestPresent and make callback asynchronous. (Closed)
Patch Set: Fix FakeVRDevice Created 4 years, 1 month 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();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return display.Clone(); 63 return display.Clone();
64 } 64 }
65 65
66 mojom::VRPosePtr FakeVRDevice::GetPose() { 66 mojom::VRPosePtr FakeVRDevice::GetPose() {
67 return pose_.Clone(); 67 return pose_.Clone();
68 } 68 }
69 69
70 void FakeVRDevice::ResetPose() {} 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(bool secure_origin) { 73 void FakeVRDevice::RequestPresent(const base::Callback<void(bool)>& callback) {
74 return true; 74 callback.Run(true);
75 } 75 }
76 76
77 void FakeVRDevice::SetSecureOrigin(bool secure_origin) {}
78
77 void FakeVRDevice::ExitPresent() {} 79 void FakeVRDevice::ExitPresent() {}
78 80
79 void FakeVRDevice::SubmitFrame(mojom::VRPosePtr pose) {} 81 void FakeVRDevice::SubmitFrame(mojom::VRPosePtr pose) {}
80 82
81 void FakeVRDevice::UpdateLayerBounds(mojom::VRLayerBoundsPtr leftBounds, 83 void FakeVRDevice::UpdateLayerBounds(mojom::VRLayerBoundsPtr leftBounds,
82 mojom::VRLayerBoundsPtr rightBounds) {} 84 mojom::VRLayerBoundsPtr rightBounds) {}
83 85
84 void FakeVRDevice::AddService(VRServiceImpl* service) {} 86 void FakeVRDevice::AddService(VRServiceImpl* service) {}
85 87
86 void FakeVRDevice::RemoveService(VRServiceImpl* service) {} 88 void FakeVRDevice::RemoveService(VRServiceImpl* service) {}
87 89
88 } // namespace device 90 } // 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