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

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

Issue 2494983003: Mojo C++ bindings: switch device/vr mojom target to use STL/WTF types. (Closed)
Patch Set: . 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
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(VRDeviceProvider* provider) : VRDevice(provider) { 9 FakeVRDevice::FakeVRDevice(VRDeviceProvider* provider) : VRDevice(provider) {
10 device_ = mojom::VRDisplayInfo::New(); 10 device_ = mojom::VRDisplayInfo::New();
(...skipping 21 matching lines...) Expand all
32 float offset, 32 float offset,
33 uint32_t size) { 33 uint32_t size) {
34 mojom::VREyeParametersPtr eye = mojom::VREyeParameters::New(); 34 mojom::VREyeParametersPtr eye = mojom::VREyeParameters::New();
35 35
36 eye->fieldOfView = mojom::VRFieldOfView::New(); 36 eye->fieldOfView = mojom::VRFieldOfView::New();
37 eye->fieldOfView->upDegrees = fov; 37 eye->fieldOfView->upDegrees = fov;
38 eye->fieldOfView->downDegrees = fov; 38 eye->fieldOfView->downDegrees = fov;
39 eye->fieldOfView->leftDegrees = fov; 39 eye->fieldOfView->leftDegrees = fov;
40 eye->fieldOfView->rightDegrees = fov; 40 eye->fieldOfView->rightDegrees = fov;
41 41
42 eye->offset = mojo::Array<float>::New(3); 42 eye->offset.resize(3);
43 eye->offset[0] = offset; 43 eye->offset[0] = offset;
44 eye->offset[1] = 0.0f; 44 eye->offset[1] = 0.0f;
45 eye->offset[2] = 0.0f; 45 eye->offset[2] = 0.0f;
46 46
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
(...skipping 23 matching lines...) Expand all
76 76
77 void FakeVRDevice::ExitPresent(VRServiceImpl* service) {} 77 void FakeVRDevice::ExitPresent(VRServiceImpl* service) {}
78 78
79 void FakeVRDevice::SubmitFrame(VRServiceImpl* service, mojom::VRPosePtr pose) {} 79 void FakeVRDevice::SubmitFrame(VRServiceImpl* service, mojom::VRPosePtr pose) {}
80 80
81 void FakeVRDevice::UpdateLayerBounds(VRServiceImpl* service, 81 void FakeVRDevice::UpdateLayerBounds(VRServiceImpl* service,
82 mojom::VRLayerBoundsPtr leftBounds, 82 mojom::VRLayerBoundsPtr leftBounds,
83 mojom::VRLayerBoundsPtr rightBounds) {} 83 mojom::VRLayerBoundsPtr rightBounds) {}
84 84
85 } // namespace device 85 } // namespace device
OLDNEW
« no previous file with comments | « device/vr/android/gvr/gvr_device.cc ('k') | third_party/WebKit/Source/modules/vr/VRFrameData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698