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

Side by Side Diff: device/vr/android/gvr/gvr_device.cc

Issue 2329893002: Isolate a presenting VR device from pages other than the one presenting. (Closed)
Patch Set: Unit tests Created 4 years, 3 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/android/gvr/gvr_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/android/gvr/gvr_device.h" 5 #include "device/vr/android/gvr/gvr_device.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 pose->position[2] = decomposed_transform.translate[2]; 134 pose->position[2] = decomposed_transform.translate[2];
135 } 135 }
136 136
137 return pose; 137 return pose;
138 } 138 }
139 139
140 void GvrDevice::ResetPose() { 140 void GvrDevice::ResetPose() {
141 delegate_->gvr_api()->ResetTracking(); 141 delegate_->gvr_api()->ResetTracking();
142 } 142 }
143 143
144 void GvrDevice::RequestPresent() { 144 bool GvrDevice::RequestPresent() {
145 delegate_->RequestWebVRPresent(); 145 delegate_->RequestWebVRPresent();
146 return true;
146 } 147 }
147 148
148 void GvrDevice::ExitPresent() { 149 void GvrDevice::ExitPresent() {
149 delegate_->ExitWebVRPresent(); 150 delegate_->ExitWebVRPresent();
150 } 151 }
151 152
152 void GvrDevice::SubmitFrame() { 153 void GvrDevice::SubmitFrame(VRPosePtr pose) {
153 delegate_->SubmitWebVRFrame(); 154 delegate_->SubmitWebVRFrame();
154 } 155 }
155 156
156 void GvrDevice::UpdateLayerBounds(VRLayerBoundsPtr leftBounds, 157 void GvrDevice::UpdateLayerBounds(VRLayerBoundsPtr leftBounds,
157 VRLayerBoundsPtr rightBounds) { 158 VRLayerBoundsPtr rightBounds) {
158 delegate_->UpdateWebVRTextureBounds(0, // Left eye 159 delegate_->UpdateWebVRTextureBounds(0, // Left eye
159 leftBounds->left, leftBounds->top, 160 leftBounds->left, leftBounds->top,
160 leftBounds->width, leftBounds->height); 161 leftBounds->width, leftBounds->height);
161 delegate_->UpdateWebVRTextureBounds(1, // Right eye 162 delegate_->UpdateWebVRTextureBounds(1, // Right eye
162 rightBounds->left, rightBounds->top, 163 rightBounds->left, rightBounds->top,
163 rightBounds->width, rightBounds->height); 164 rightBounds->width, rightBounds->height);
164 } 165 }
165 166
166 } // namespace device 167 } // namespace device
OLDNEW
« no previous file with comments | « device/vr/android/gvr/gvr_device.h ('k') | device/vr/vr_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698