| 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 12 matching lines...) Expand all Loading... |
| 23 class ContentViewCore; | 23 class ContentViewCore; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace ui { | 26 namespace ui { |
| 27 class WindowAndroid; | 27 class WindowAndroid; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace vr_shell { | 30 namespace vr_shell { |
| 31 | 31 |
| 32 class VrCompositor; | 32 class VrCompositor; |
| 33 class VrController; |
| 34 class VrInputManager; |
| 33 class VrShellDelegate; | 35 class VrShellDelegate; |
| 34 class VrShellRenderer; | 36 class VrShellRenderer; |
| 37 struct VrGesture; |
| 38 |
| 35 | 39 |
| 36 class VrShell : public device::GvrDelegate { | 40 class VrShell : public device::GvrDelegate { |
| 37 public: | 41 public: |
| 38 VrShell(JNIEnv* env, jobject obj, | 42 VrShell(JNIEnv* env, jobject obj, |
| 39 content::ContentViewCore* content_cvc, | 43 content::ContentViewCore* content_cvc, |
| 40 ui::WindowAndroid* content_window, | 44 ui::WindowAndroid* content_window, |
| 41 content::ContentViewCore* ui_cvc, | 45 content::ContentViewCore* ui_cvc, |
| 42 ui::WindowAndroid* ui_window); | 46 ui::WindowAndroid* ui_window); |
| 43 | 47 |
| 44 void UpdateCompositorLayers(JNIEnv* env, | 48 void UpdateCompositorLayers(JNIEnv* env, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 std::unique_ptr<VrCompositor> content_compositor_; | 136 std::unique_ptr<VrCompositor> content_compositor_; |
| 133 content::ContentViewCore* content_cvc_; | 137 content::ContentViewCore* content_cvc_; |
| 134 std::unique_ptr<VrCompositor> ui_compositor_; | 138 std::unique_ptr<VrCompositor> ui_compositor_; |
| 135 content::ContentViewCore* ui_cvc_; | 139 content::ContentViewCore* ui_cvc_; |
| 136 | 140 |
| 137 VrShellDelegate* delegate_; | 141 VrShellDelegate* delegate_; |
| 138 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; | 142 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; |
| 139 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; | 143 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; |
| 140 | 144 |
| 141 gvr::Quatf controller_quat_; | 145 gvr::Quatf controller_quat_; |
| 142 bool controller_active_ = false; | |
| 143 | 146 |
| 144 gvr::Vec3f target_point_; | 147 gvr::Vec3f target_point_; |
| 145 const ContentRectangle* target_element_ = nullptr; | 148 const ContentRectangle* target_element_ = nullptr; |
| 149 VrInputManager* current_input_target_ = nullptr; |
| 146 int ui_tex_width_ = 0; | 150 int ui_tex_width_ = 0; |
| 147 int ui_tex_height_ = 0; | 151 int ui_tex_height_ = 0; |
| 148 | 152 |
| 149 bool webvr_mode_ = false; | 153 bool webvr_mode_ = false; |
| 150 bool webvr_secure_origin_ = false; | 154 bool webvr_secure_origin_ = false; |
| 151 | 155 |
| 156 std::unique_ptr<VrController> controller_; |
| 157 scoped_refptr<VrInputManager> content_input_manager_; |
| 158 scoped_refptr<VrInputManager> ui_input_manager_; |
| 159 |
| 152 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 160 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 153 | 161 |
| 154 DISALLOW_COPY_AND_ASSIGN(VrShell); | 162 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 155 }; | 163 }; |
| 156 | 164 |
| 157 bool RegisterVrShell(JNIEnv* env); | 165 bool RegisterVrShell(JNIEnv* env); |
| 158 | 166 |
| 159 } // namespace vr_shell | 167 } // namespace vr_shell |
| 160 | 168 |
| 161 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 169 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |