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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 namespace blink { | 27 namespace blink { |
28 class WebInputEvent; | 28 class WebInputEvent; |
29 } | 29 } |
30 | 30 |
31 namespace content { | 31 namespace content { |
32 class WebContents; | 32 class WebContents; |
33 } | 33 } |
34 | 34 |
35 namespace ui { | 35 namespace ui { |
36 class WindowAndroid; | 36 class ViewRoot; |
37 } | 37 } |
38 | 38 |
39 namespace vr_shell { | 39 namespace vr_shell { |
40 | 40 |
41 class UiInterface; | 41 class UiInterface; |
42 class VrCompositor; | 42 class VrCompositor; |
43 class VrGLThread; | 43 class VrGLThread; |
44 class VrInputManager; | 44 class VrInputManager; |
45 class VrMetricsHelper; | 45 class VrMetricsHelper; |
46 class VrShellDelegate; | 46 class VrShellDelegate; |
(...skipping 10 matching lines...) Expand all Loading... |
57 OMNIBOX_CONTENT, | 57 OMNIBOX_CONTENT, |
58 SET_CONTENT_PAUSED, | 58 SET_CONTENT_PAUSED, |
59 }; | 59 }; |
60 | 60 |
61 class VrMetricsHelper; | 61 class VrMetricsHelper; |
62 | 62 |
63 // The native instance of the Java VrShell. This class is not threadsafe and | 63 // The native instance of the Java VrShell. This class is not threadsafe and |
64 // must only be used on the UI thread. | 64 // must only be used on the UI thread. |
65 class VrShell : public device::GvrDelegate, content::WebContentsObserver { | 65 class VrShell : public device::GvrDelegate, content::WebContentsObserver { |
66 public: | 66 public: |
67 VrShell(JNIEnv* env, jobject obj, | 67 VrShell(JNIEnv* env, |
| 68 jobject obj, |
68 content::WebContents* main_contents, | 69 content::WebContents* main_contents, |
69 ui::WindowAndroid* content_window, | 70 ui::ViewRoot* content_view_root, |
70 content::WebContents* ui_contents, | 71 content::WebContents* ui_contents, |
71 ui::WindowAndroid* ui_window, | 72 ui::ViewRoot* ui_view_root, |
72 bool for_web_vr, | 73 bool for_web_vr, |
73 VrShellDelegate* delegate, | 74 VrShellDelegate* delegate, |
74 gvr_context* gvr_api, | 75 gvr_context* gvr_api, |
75 bool reprojected_rendering); | 76 bool reprojected_rendering); |
76 void SwapContents(JNIEnv* env, | 77 void SwapContents(JNIEnv* env, |
77 const base::android::JavaParamRef<jobject>& obj, | 78 const base::android::JavaParamRef<jobject>& obj, |
78 const base::android::JavaParamRef<jobject>& web_contents); | 79 const base::android::JavaParamRef<jobject>& web_contents); |
79 void LoadUIContent(JNIEnv* env, | 80 void LoadUIContent(JNIEnv* env, |
80 const base::android::JavaParamRef<jobject>& obj); | 81 const base::android::JavaParamRef<jobject>& obj); |
81 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 82 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 213 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
213 | 214 |
214 DISALLOW_COPY_AND_ASSIGN(VrShell); | 215 DISALLOW_COPY_AND_ASSIGN(VrShell); |
215 }; | 216 }; |
216 | 217 |
217 bool RegisterVrShell(JNIEnv* env); | 218 bool RegisterVrShell(JNIEnv* env); |
218 | 219 |
219 } // namespace vr_shell | 220 } // namespace vr_shell |
220 | 221 |
221 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 222 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
OLD | NEW |