Chromium Code Reviews| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 void SetWebVrMode(JNIEnv* env, | 59 void SetWebVrMode(JNIEnv* env, |
| 60 const base::android::JavaParamRef<jobject>& obj, | 60 const base::android::JavaParamRef<jobject>& obj, |
| 61 bool enabled); | 61 bool enabled); |
| 62 | 62 |
| 63 // html/js UI hooks. | 63 // html/js UI hooks. |
| 64 static base::WeakPtr<VrShell> GetWeakPtr(); | 64 static base::WeakPtr<VrShell> GetWeakPtr(); |
| 65 void OnDomContentsLoaded(); | 65 void OnDomContentsLoaded(); |
| 66 void SetUiTextureSize(int width, int height); | 66 void SetUiTextureSize(int width, int height); |
| 67 | 67 |
| 68 // device::GvrDelegate implementation | 68 // device::GvrDelegate implementation |
| 69 void SetWebVRSecureOrigin(bool secure_origin) override; | |
| 69 void SubmitWebVRFrame() override; | 70 void SubmitWebVRFrame() override; |
| 70 void UpdateWebVRTextureBounds( | 71 void UpdateWebVRTextureBounds( |
| 71 int eye, float left, float top, float width, float height) override; | 72 int eye, float left, float top, float width, float height) override; |
| 72 gvr::GvrApi* gvr_api() override; | 73 gvr::GvrApi* gvr_api() override; |
| 73 | 74 |
| 74 void ContentSurfaceChanged( | 75 void ContentSurfaceChanged( |
| 75 JNIEnv* env, | 76 JNIEnv* env, |
| 76 const base::android::JavaParamRef<jobject>& object, | 77 const base::android::JavaParamRef<jobject>& object, |
| 77 jint width, | 78 jint width, |
| 78 jint height, | 79 jint height, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; | 134 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; |
| 134 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; | 135 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; |
| 135 | 136 |
| 136 gvr::Quatf controller_quat_; | 137 gvr::Quatf controller_quat_; |
| 137 bool controller_active_ = false; | 138 bool controller_active_ = false; |
| 138 gvr::Vec3f look_at_vector_; | 139 gvr::Vec3f look_at_vector_; |
| 139 int ui_tex_width_ = 0; | 140 int ui_tex_width_ = 0; |
| 140 int ui_tex_height_ = 0; | 141 int ui_tex_height_ = 0; |
| 141 | 142 |
| 142 bool webvr_mode_ = false; | 143 bool webvr_mode_ = false; |
| 144 bool webvr_secure_origin_; | |
|
bshe
2016/09/29 12:46:47
set default to false?
| |
| 143 | 145 |
| 144 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 146 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 145 | 147 |
| 146 DISALLOW_COPY_AND_ASSIGN(VrShell); | 148 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 147 }; | 149 }; |
| 148 | 150 |
| 149 bool RegisterVrShell(JNIEnv* env); | 151 bool RegisterVrShell(JNIEnv* env); |
| 150 | 152 |
| 151 } // namespace vr_shell | 153 } // namespace vr_shell |
| 152 | 154 |
| 153 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 155 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |