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 CHROME_BROWSER_ANDROID_VR_SHELL_NON_PRESENTING_GVR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_NON_PRESENTING_GVR_DELEGATE_H_ |
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_NON_PRESENTING_GVR_DELEGATE_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_NON_PRESENTING_GVR_DELEGATE_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 10 matching lines...) Expand all Loading... |
21 // A non presenting delegate for magic window mode. | 21 // A non presenting delegate for magic window mode. |
22 class NonPresentingGvrDelegate : public device::GvrDelegate, | 22 class NonPresentingGvrDelegate : public device::GvrDelegate, |
23 public device::mojom::VRVSyncProvider { | 23 public device::mojom::VRVSyncProvider { |
24 public: | 24 public: |
25 explicit NonPresentingGvrDelegate(gvr_context* context); | 25 explicit NonPresentingGvrDelegate(gvr_context* context); |
26 | 26 |
27 ~NonPresentingGvrDelegate() override; | 27 ~NonPresentingGvrDelegate() override; |
28 | 28 |
29 // GvrDelegate implementation | 29 // GvrDelegate implementation |
30 void SetWebVRSecureOrigin(bool secure_origin) override {} | 30 void SetWebVRSecureOrigin(bool secure_origin) override {} |
31 void SubmitWebVRFrame() override {} | 31 void SubmitWebVRFrame(int frame_index, const gpu::Mailbox&) override {} |
32 void UpdateWebVRTextureBounds(int16_t frame_index, | 32 void UpdateWebVRTextureBounds(int16_t frame_index, |
33 const gvr::Rectf& left_bounds, | 33 const gvr::Rectf& left_bounds, |
34 const gvr::Rectf& right_bounds) override {} | 34 const gvr::Rectf& right_bounds) override {} |
35 void OnVRVsyncProviderRequest( | 35 void OnVRVsyncProviderRequest( |
36 device::mojom::VRVSyncProviderRequest request) override; | 36 device::mojom::VRVSyncProviderRequest request) override; |
37 void UpdateVSyncInterval(int64_t timebase_nanos, | 37 void UpdateVSyncInterval(int64_t timebase_nanos, |
38 double interval_seconds) override; | 38 double interval_seconds) override; |
39 bool SupportsPresentation() override; | 39 bool SupportsPresentation() override; |
40 void ResetPose() override; | 40 void ResetPose() override; |
41 void CreateVRDisplayInfo( | 41 void CreateVRDisplayInfo( |
(...skipping 26 matching lines...) Expand all Loading... |
68 GetVSyncCallback callback_; | 68 GetVSyncCallback callback_; |
69 mojo::Binding<device::mojom::VRVSyncProvider> binding_; | 69 mojo::Binding<device::mojom::VRVSyncProvider> binding_; |
70 base::WeakPtrFactory<NonPresentingGvrDelegate> weak_ptr_factory_; | 70 base::WeakPtrFactory<NonPresentingGvrDelegate> weak_ptr_factory_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(NonPresentingGvrDelegate); | 72 DISALLOW_COPY_AND_ASSIGN(NonPresentingGvrDelegate); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace vr_shell | 75 } // namespace vr_shell |
76 | 76 |
77 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_NON_PRESENTING_GVR_DELEGATE_H_ | 77 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_NON_PRESENTING_GVR_DELEGATE_H_ |
OLD | NEW |