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_VR_SHELL_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 const base::android::JavaParamRef<jobject>& obj, | 51 const base::android::JavaParamRef<jobject>& obj, |
52 jint texture_data_handle); | 52 jint texture_data_handle); |
53 void DrawFrame(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 53 void DrawFrame(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
54 void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 54 void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
55 void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 55 void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
56 void SetWebVrMode(JNIEnv* env, | 56 void SetWebVrMode(JNIEnv* env, |
57 const base::android::JavaParamRef<jobject>& obj, | 57 const base::android::JavaParamRef<jobject>& obj, |
58 bool enabled); | 58 bool enabled); |
59 | 59 |
60 // device::GvrDelegate implementation | 60 // device::GvrDelegate implementation |
| 61 void SetWebVRSecureOrigin(bool secure_origin) override; |
61 void SubmitWebVRFrame() override; | 62 void SubmitWebVRFrame() override; |
62 void UpdateWebVRTextureBounds( | 63 void UpdateWebVRTextureBounds( |
63 int eye, float left, float top, float width, float height) override; | 64 int eye, float left, float top, float width, float height) override; |
64 gvr::GvrApi* gvr_api() override; | 65 gvr::GvrApi* gvr_api() override; |
65 | 66 |
66 void ContentSurfaceDestroyed( | 67 void ContentSurfaceDestroyed( |
67 JNIEnv* env, | 68 JNIEnv* env, |
68 const base::android::JavaParamRef<jobject>& object); | 69 const base::android::JavaParamRef<jobject>& object); |
69 void ContentSurfaceChanged( | 70 void ContentSurfaceChanged( |
70 JNIEnv* env, | 71 JNIEnv* env, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 115 |
115 VrShellDelegate* delegate_; | 116 VrShellDelegate* delegate_; |
116 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; | 117 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; |
117 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; | 118 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; |
118 | 119 |
119 gvr::Quatf controller_quat_; | 120 gvr::Quatf controller_quat_; |
120 bool controller_active_ = false; | 121 bool controller_active_ = false; |
121 gvr::Vec3f look_at_vector_; | 122 gvr::Vec3f look_at_vector_; |
122 | 123 |
123 bool webvr_mode_ = false; | 124 bool webvr_mode_ = false; |
| 125 bool webvr_secure_origin_; |
124 | 126 |
125 DISALLOW_COPY_AND_ASSIGN(VrShell); | 127 DISALLOW_COPY_AND_ASSIGN(VrShell); |
126 }; | 128 }; |
127 | 129 |
128 bool RegisterVrShell(JNIEnv* env); | 130 bool RegisterVrShell(JNIEnv* env); |
129 | 131 |
130 } // namespace vr_shell | 132 } // namespace vr_shell |
131 | 133 |
132 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 134 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
OLD | NEW |