| 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 #ifndef DEVICE_VR_ANDROID_GVR_DELEGATE_H | 5 #ifndef DEVICE_VR_ANDROID_GVR_DELEGATE_H |
| 6 #define DEVICE_VR_ANDROID_GVR_DELEGATE_H | 6 #define DEVICE_VR_ANDROID_GVR_DELEGATE_H |
| 7 | 7 |
| 8 #include "device/vr/android/gvr/gvr_device_provider.h" | 8 #include "device/vr/android/gvr/gvr_device_provider.h" |
| 9 #include "device/vr/vr_export.h" | 9 #include "device/vr/vr_export.h" |
| 10 #include "device/vr/vr_service.mojom.h" | 10 #include "device/vr/vr_service.mojom.h" |
| 11 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr_types.h" | 11 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
gvr_types.h" |
| 12 | 12 |
| 13 namespace device { | 13 namespace device { |
| 14 | 14 |
| 15 class DEVICE_VR_EXPORT GvrDelegate { | 15 class DEVICE_VR_EXPORT GvrDelegate { |
| 16 public: | 16 public: |
| 17 virtual void SetWebVRSecureOrigin(bool secure_origin) = 0; | 17 virtual void SetWebVRSecureOrigin(bool secure_origin) = 0; |
| 18 virtual void SubmitWebVRFrame(int16_t frame_index, | 18 virtual void SubmitWebVRFrame(int16_t frame_index, |
| 19 const gpu::MailboxHolder& mailbox) = 0; | 19 const gpu::MailboxHolder& mailbox) = 0; |
| 20 virtual void UpdateWebVRTextureBounds(int16_t frame_index, | 20 virtual void UpdateWebVRTextureBounds(int16_t frame_index, |
| 21 const gvr::Rectf& left_bounds, | 21 const gvr::Rectf& left_bounds, |
| 22 const gvr::Rectf& right_bounds, | 22 const gvr::Rectf& right_bounds, |
| 23 const gvr::Sizei& source_size) = 0; | 23 const gvr::Sizei& source_size) = 0; |
| 24 virtual void OnVRVsyncProviderRequest( | 24 virtual void OnVRVsyncProviderRequest( |
| 25 mojom::VRVSyncProviderRequest request) = 0; | 25 mojom::VRVSyncProviderRequest request) = 0; |
| 26 virtual void UpdateVSyncInterval(int64_t timebase_nanos, | 26 virtual void UpdateVSyncInterval(int64_t timebase_nanos, |
| 27 double interval_seconds) = 0; | 27 double interval_seconds) = 0; |
| 28 virtual bool SupportsPresentation() = 0; | 28 virtual bool SupportsPresentation() = 0; |
| 29 virtual void ResetPose() = 0; | |
| 30 virtual void CreateVRDisplayInfo( | 29 virtual void CreateVRDisplayInfo( |
| 31 const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback, | 30 const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback, |
| 32 uint32_t device_id) = 0; | 31 uint32_t device_id) = 0; |
| 33 | 32 |
| 34 protected: | 33 protected: |
| 35 virtual ~GvrDelegate() {} | 34 virtual ~GvrDelegate() {} |
| 36 }; | 35 }; |
| 37 | 36 |
| 38 class DEVICE_VR_EXPORT GvrDelegateProvider { | 37 class DEVICE_VR_EXPORT GvrDelegateProvider { |
| 39 public: | 38 public: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 53 protected: | 52 protected: |
| 54 virtual ~GvrDelegateProvider() {} | 53 virtual ~GvrDelegateProvider() {} |
| 55 | 54 |
| 56 private: | 55 private: |
| 57 static base::Callback<GvrDelegateProvider*()> delegate_provider_; | 56 static base::Callback<GvrDelegateProvider*()> delegate_provider_; |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 } // namespace device | 59 } // namespace device |
| 61 | 60 |
| 62 #endif // DEVICE_VR_ANDROID_GVR_DELEGATE_H | 61 #endif // DEVICE_VR_ANDROID_GVR_DELEGATE_H |
| OLD | NEW |