| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 148 } |
| 149 | 149 |
| 150 void NonPresentingGvrDelegate::CreateVRDisplayInfo( | 150 void NonPresentingGvrDelegate::CreateVRDisplayInfo( |
| 151 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, | 151 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, |
| 152 uint32_t device_id) { | 152 uint32_t device_id) { |
| 153 if (!gvr_api_) { | 153 if (!gvr_api_) { |
| 154 callback.Run(device::mojom::VRDisplayInfoPtr(nullptr)); | 154 callback.Run(device::mojom::VRDisplayInfoPtr(nullptr)); |
| 155 return; | 155 return; |
| 156 } | 156 } |
| 157 | 157 |
| 158 gvr::Sizei webvr_size = GvrDelegate::GetRecommendedWebVrSize(gvr_api_.get()); | 158 gfx::Size webvr_size = GvrDelegate::GetRecommendedWebVrSize(gvr_api_.get()); |
| 159 DVLOG(1) << __FUNCTION__ << ": resize recommended to " << webvr_size.width | 159 DVLOG(1) << __FUNCTION__ << ": resize recommended to " << webvr_size.width() |
| 160 << "x" << webvr_size.height; | 160 << "x" << webvr_size.height(); |
| 161 callback.Run( | 161 callback.Run( |
| 162 GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(), webvr_size, device_id)); | 162 GvrDelegate::CreateVRDisplayInfo(gvr_api_.get(), webvr_size, device_id)); |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace vr_shell | 165 } // namespace vr_shell |
| OLD | NEW |