| 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 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace ui { | 35 namespace ui { |
| 36 class WindowAndroid; | 36 class WindowAndroid; |
| 37 } | 37 } |
| 38 | 38 |
| 39 namespace vr_shell { | 39 namespace vr_shell { |
| 40 | 40 |
| 41 class AndroidUiGestureTarget; | 41 class AndroidUiGestureTarget; |
| 42 class UiInterface; | 42 class UiInterface; |
| 43 class UiWebContentsObserver; |
| 43 class VrCompositor; | 44 class VrCompositor; |
| 44 class VrGLThread; | 45 class VrGLThread; |
| 45 class VrInputManager; | 46 class VrInputManager; |
| 46 class VrMetricsHelper; | 47 class VrMetricsHelper; |
| 47 class VrShellDelegate; | 48 class VrShellDelegate; |
| 48 class VrWebContentsObserver; | 49 class VrWebContentsObserver; |
| 49 | 50 |
| 50 enum UiAction { | 51 enum UiAction { |
| 51 HISTORY_BACK = 0, | 52 HISTORY_BACK = 0, |
| 52 HISTORY_FORWARD, | 53 HISTORY_FORWARD, |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 bool webvr_mode_ = false; | 210 bool webvr_mode_ = false; |
| 210 | 211 |
| 211 content::WebContents* main_contents_ = nullptr; | 212 content::WebContents* main_contents_ = nullptr; |
| 212 base::android::ScopedJavaGlobalRef<jobject> j_motion_event_synthesizer_; | 213 base::android::ScopedJavaGlobalRef<jobject> j_motion_event_synthesizer_; |
| 213 ui::WindowAndroid* content_window_; | 214 ui::WindowAndroid* content_window_; |
| 214 std::unique_ptr<VrCompositor> content_compositor_; | 215 std::unique_ptr<VrCompositor> content_compositor_; |
| 215 content::WebContents* ui_contents_; | 216 content::WebContents* ui_contents_; |
| 216 std::unique_ptr<VrCompositor> ui_compositor_; | 217 std::unique_ptr<VrCompositor> ui_compositor_; |
| 217 | 218 |
| 218 std::unique_ptr<VrWebContentsObserver> vr_web_contents_observer_; | 219 std::unique_ptr<VrWebContentsObserver> vr_web_contents_observer_; |
| 220 std::unique_ptr<UiWebContentsObserver> ui_web_contents_observer_; |
| 219 | 221 |
| 220 VrShellDelegate* delegate_provider_ = nullptr; | 222 VrShellDelegate* delegate_provider_ = nullptr; |
| 221 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; | 223 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; |
| 222 | 224 |
| 223 std::unique_ptr<VrInputManager> content_input_manager_; | 225 std::unique_ptr<VrInputManager> content_input_manager_; |
| 224 std::unique_ptr<AndroidUiGestureTarget> android_ui_gesture_target_; | 226 std::unique_ptr<AndroidUiGestureTarget> android_ui_gesture_target_; |
| 225 std::unique_ptr<VrInputManager> ui_input_manager_; | 227 std::unique_ptr<VrInputManager> ui_input_manager_; |
| 226 std::unique_ptr<VrMetricsHelper> metrics_helper_; | 228 std::unique_ptr<VrMetricsHelper> metrics_helper_; |
| 227 | 229 |
| 228 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 230 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 229 std::unique_ptr<VrGLThread> gl_thread_; | 231 std::unique_ptr<VrGLThread> gl_thread_; |
| 230 bool reprojected_rendering_; | 232 bool reprojected_rendering_; |
| 231 | 233 |
| 232 jobject content_surface_ = nullptr; | 234 jobject content_surface_ = nullptr; |
| 233 | 235 |
| 234 // TODO(mthiesse): Remove the need for this to be stored here. | 236 // TODO(mthiesse): Remove the need for this to be stored here. |
| 235 // crbug.com/674594 | 237 // crbug.com/674594 |
| 236 gvr_context* gvr_api_; | 238 gvr_context* gvr_api_; |
| 237 | 239 |
| 238 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 240 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 239 | 241 |
| 240 DISALLOW_COPY_AND_ASSIGN(VrShell); | 242 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 241 }; | 243 }; |
| 242 | 244 |
| 243 bool RegisterVrShell(JNIEnv* env); | 245 bool RegisterVrShell(JNIEnv* env); |
| 244 | 246 |
| 245 } // namespace vr_shell | 247 } // namespace vr_shell |
| 246 | 248 |
| 247 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 249 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |