| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 jobject content_surface_ = nullptr; | 210 jobject content_surface_ = nullptr; |
| 210 | 211 |
| 211 // TODO(mthiesse): Remove the need for this to be stored here. | 212 // TODO(mthiesse): Remove the need for this to be stored here. |
| 212 // crbug.com/674594 | 213 // crbug.com/674594 |
| 213 gvr_context* gvr_api_; | 214 gvr_context* gvr_api_; |
| 214 | 215 |
| 215 // Are we currently providing a gamepad factory to the gamepad manager? | 216 // Are we currently providing a gamepad factory to the gamepad manager? |
| 216 bool gamepad_source_active_ = false; | 217 bool gamepad_source_active_ = false; |
| 217 // Registered fetcher, must remain alive for UpdateGamepadData calls. | 218 // Registered fetcher, must remain alive for UpdateGamepadData calls. |
| 218 // That's ok since the fetcher is only destroyed from VrShell's destructor. | 219 // That's ok since the fetcher is only destroyed from VrShell's destructor. |
| 219 device::GvrGamepadDataFetcher* gamepad_data_fetcher_ = nullptr; | 220 std::vector<device::GvrGamepadDataFetcher*> gamepad_data_fetchers_; |
| 220 | 221 |
| 221 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 222 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 222 | 223 |
| 223 DISALLOW_COPY_AND_ASSIGN(VrShell); | 224 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 224 }; | 225 }; |
| 225 | 226 |
| 226 bool RegisterVrShell(JNIEnv* env); | 227 bool RegisterVrShell(JNIEnv* env); |
| 227 | 228 |
| 228 } // namespace vr_shell | 229 } // namespace vr_shell |
| 229 | 230 |
| 230 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 231 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |