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

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

Issue 2505493004: Wired up vrdisplayactivate/deactivate (Closed)
Patch Set: Again with the upstream issues 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 | « no previous file | device/vr/android/gvr/gvr_device_provider.cc » ('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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 delegate_->UpdateWebVRTextureBounds(left_gvr_bounds, right_gvr_bounds); 238 delegate_->UpdateWebVRTextureBounds(left_gvr_bounds, right_gvr_bounds);
239 } 239 }
240 240
241 void GvrDevice::SetDelegate(const base::WeakPtr<GvrDelegate>& delegate) { 241 void GvrDevice::SetDelegate(const base::WeakPtr<GvrDelegate>& delegate) {
242 delegate_ = delegate; 242 delegate_ = delegate;
243 243
244 // Notify the clients that this device has changed 244 // Notify the clients that this device has changed
245 if (delegate_) { 245 if (delegate_) {
246 delegate_->SetWebVRSecureOrigin(secure_origin_); 246 delegate_->SetWebVRSecureOrigin(secure_origin_);
247 OnDisplayChanged(); 247 OnChanged();
248 } 248 }
249 } 249 }
250 250
251 gvr::GvrApi* GvrDevice::GetGvrApi() { 251 gvr::GvrApi* GvrDevice::GetGvrApi() {
252 if (!delegate_) 252 if (!delegate_)
253 return nullptr; 253 return nullptr;
254 254
255 return delegate_->gvr_api(); 255 return delegate_->gvr_api();
256 } 256 }
257 257
258 } // namespace device 258 } // namespace device
OLDNEW
« no previous file with comments | « no previous file | device/vr/android/gvr/gvr_device_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698