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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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; | 146 bool controller_active_ = false; |
143 | 147 |
144 gvr::Vec3f target_point_; | 148 gvr::Vec3f target_point_; |
145 const ContentRectangle* target_element_ = nullptr; | 149 const ContentRectangle* target_element_ = 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 |
153 int current_ui_rect_ = -1; | |
cjgrant
2016/09/30 20:26:39
nit: In ToT, this would be at home alongside targe
mthiesse
2016/10/03 16:30:13
Done.
| |
154 | |
149 bool webvr_mode_ = false; | 155 bool webvr_mode_ = false; |
150 bool webvr_secure_origin_ = false; | 156 bool webvr_secure_origin_ = false; |
151 | 157 |
158 std::unique_ptr<VrController> controller_; | |
159 scoped_refptr<VrInputManager> content_input_manager_; | |
160 scoped_refptr<VrInputManager> ui_input_manager_; | |
161 | |
152 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 162 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
153 | 163 |
154 DISALLOW_COPY_AND_ASSIGN(VrShell); | 164 DISALLOW_COPY_AND_ASSIGN(VrShell); |
155 }; | 165 }; |
156 | 166 |
157 bool RegisterVrShell(JNIEnv* env); | 167 bool RegisterVrShell(JNIEnv* env); |
158 | 168 |
159 } // namespace vr_shell | 169 } // namespace vr_shell |
160 | 170 |
161 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 171 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
OLD | NEW |