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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 bool reprojected_rendering); | 76 bool reprojected_rendering); |
77 void SwapContents( | 77 void SwapContents( |
78 JNIEnv* env, | 78 JNIEnv* env, |
79 const base::android::JavaParamRef<jobject>& obj, | 79 const base::android::JavaParamRef<jobject>& obj, |
80 const base::android::JavaParamRef<jobject>& web_contents, | 80 const base::android::JavaParamRef<jobject>& web_contents, |
81 const base::android::JavaParamRef<jobject>& touch_event_synthesizer); | 81 const base::android::JavaParamRef<jobject>& touch_event_synthesizer); |
82 void LoadUIContent(JNIEnv* env, | 82 void LoadUIContent(JNIEnv* env, |
83 const base::android::JavaParamRef<jobject>& obj); | 83 const base::android::JavaParamRef<jobject>& obj); |
84 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 84 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
85 void OnTriggerEvent(JNIEnv* env, | 85 void OnTriggerEvent(JNIEnv* env, |
86 const base::android::JavaParamRef<jobject>& obj); | 86 const base::android::JavaParamRef<jobject>& obj, |
87 bool touched); | |
87 void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 88 void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
88 void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 89 void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
89 void SetSurface(JNIEnv* env, | 90 void SetSurface(JNIEnv* env, |
90 const base::android::JavaParamRef<jobject>& obj, | 91 const base::android::JavaParamRef<jobject>& obj, |
91 const base::android::JavaParamRef<jobject>& surface); | 92 const base::android::JavaParamRef<jobject>& surface); |
92 void SetWebVrMode(JNIEnv* env, | 93 void SetWebVrMode(JNIEnv* env, |
93 const base::android::JavaParamRef<jobject>& obj, | 94 const base::android::JavaParamRef<jobject>& obj, |
94 bool enabled); | 95 bool enabled); |
95 bool GetWebVrMode(JNIEnv* env, | 96 bool GetWebVrMode(JNIEnv* env, |
96 const base::android::JavaParamRef<jobject>& obj); | 97 const base::android::JavaParamRef<jobject>& obj); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 bool is_capturing_audio_ = false; | 223 bool is_capturing_audio_ = false; |
223 bool is_capturing_video_ = false; | 224 bool is_capturing_video_ = false; |
224 bool is_capturing_screen_ = false; | 225 bool is_capturing_screen_ = false; |
225 | 226 |
226 // TODO(mthiesse): Remove the need for this to be stored here. | 227 // TODO(mthiesse): Remove the need for this to be stored here. |
227 // crbug.com/674594 | 228 // crbug.com/674594 |
228 gvr_context* gvr_api_; | 229 gvr_context* gvr_api_; |
229 | 230 |
230 // Are we currently providing a gamepad factory to the gamepad manager? | 231 // Are we currently providing a gamepad factory to the gamepad manager? |
231 bool gamepad_source_active_ = false; | 232 bool gamepad_source_active_ = false; |
232 // Registered fetcher, must remain alive for UpdateGamepadData calls. | 233 // Registered fetcher, must remain alive for UpdateGamepadData calls. |
mthiesse
2017/05/16 00:44:37
nit: fetchers
| |
233 // That's ok since the fetcher is only destroyed from VrShell's destructor. | 234 // That's ok since the fetcher is only destroyed from VrShell's destructor. |
234 device::GvrGamepadDataFetcher* gamepad_data_fetcher_ = nullptr; | 235 std::vector<device::GvrGamepadDataFetcher*> gamepad_data_fetchers_; |
235 | 236 |
236 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 237 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
237 | 238 |
238 DISALLOW_COPY_AND_ASSIGN(VrShell); | 239 DISALLOW_COPY_AND_ASSIGN(VrShell); |
239 }; | 240 }; |
240 | 241 |
241 bool RegisterVrShell(JNIEnv* env); | 242 bool RegisterVrShell(JNIEnv* env); |
242 | 243 |
243 } // namespace vr_shell | 244 } // namespace vr_shell |
244 | 245 |
245 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 246 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
OLD | NEW |