| OLD | NEW |
| 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 "chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h" | 5 #include "chrome/browser/android/vr_shell/non_presenting_gvr_delegate.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr.h" | 10 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 return; | 154 return; |
| 155 } | 155 } |
| 156 | 156 |
| 157 gfx::Size webvr_size = GvrDelegate::GetRecommendedWebVrSize(gvr_api_.get()); | 157 gfx::Size webvr_size = GvrDelegate::GetRecommendedWebVrSize(gvr_api_.get()); |
| 158 DVLOG(1) << __FUNCTION__ << ": resize recommended to " << webvr_size.width() | 158 DVLOG(1) << __FUNCTION__ << ": resize recommended to " << webvr_size.width() |
| 159 << "x" << webvr_size.height(); | 159 << "x" << webvr_size.height(); |
| 160 callback.Run( | 160 callback.Run( |
| 161 GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(), webvr_size, device_id)); | 161 GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(), webvr_size, device_id)); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void NonPresentingGvrDelegate::UpdateContext(gvr_context* context) { |
| 165 gvr_api_ = gvr::GvrApi::WrapNonOwned(context); |
| 166 } |
| 167 |
| 164 } // namespace vr_shell | 168 } // namespace vr_shell |
| OLD | NEW |