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

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

Issue 2658643003: Refactor GvrDelegate ownership into GvrDelegateProvider and fix more threading violations. (Closed)
Patch Set: Address comments 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();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 eye->renderWidth = size; 47 eye->renderWidth = size;
48 eye->renderHeight = size; 48 eye->renderHeight = size;
49 49
50 return eye; 50 return eye;
51 } 51 }
52 52
53 void FakeVRDevice::SetVRDevice(const mojom::VRDisplayInfoPtr& device) { 53 void FakeVRDevice::SetVRDevice(const mojom::VRDisplayInfoPtr& device) {
54 device_ = device.Clone(); 54 device_ = device.Clone();
55 } 55 }
56 56
57 mojom::VRDisplayInfoPtr FakeVRDevice::GetVRDevice() { 57 void FakeVRDevice::GetVRDevice(
58 const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback) {
58 mojom::VRDisplayInfoPtr display = device_.Clone(); 59 mojom::VRDisplayInfoPtr display = device_.Clone();
59 return display.Clone(); 60 callback.Run(std::move(display));
60 } 61 }
61 62
62 void FakeVRDevice::ResetPose() {} 63 void FakeVRDevice::ResetPose() {}
63 64
64 void FakeVRDevice::RequestPresent(const base::Callback<void(bool)>& callback) { 65 void FakeVRDevice::RequestPresent(const base::Callback<void(bool)>& callback) {
65 callback.Run(true); 66 callback.Run(true);
66 } 67 }
67 68
68 void FakeVRDevice::SetSecureOrigin(bool secure_origin) {} 69 void FakeVRDevice::SetSecureOrigin(bool secure_origin) {}
69 70
70 void FakeVRDevice::ExitPresent() { 71 void FakeVRDevice::ExitPresent() {
71 OnExitPresent(); 72 OnExitPresent();
72 } 73 }
73 74
74 void FakeVRDevice::SubmitFrame(mojom::VRPosePtr pose) {} 75 void FakeVRDevice::SubmitFrame(mojom::VRPosePtr pose) {}
75 76
76 void FakeVRDevice::UpdateLayerBounds(int16_t frame_index, 77 void FakeVRDevice::UpdateLayerBounds(int16_t frame_index,
77 mojom::VRLayerBoundsPtr leftBounds, 78 mojom::VRLayerBoundsPtr leftBounds,
78 mojom::VRLayerBoundsPtr rightBounds) {} 79 mojom::VRLayerBoundsPtr rightBounds) {}
79 80
80 void FakeVRDevice::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) {} 81 void FakeVRDevice::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) {}
81 82
82 } // namespace device 83 } // 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