| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void DrawFrame(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 88 void DrawFrame(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
| 89 void OnTriggerEvent(JNIEnv* env, | 89 void OnTriggerEvent(JNIEnv* env, |
| 90 const base::android::JavaParamRef<jobject>& obj); | 90 const base::android::JavaParamRef<jobject>& obj); |
| 91 void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 91 void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
| 92 void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 92 void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
| 93 void SetWebVrMode(JNIEnv* env, | 93 void SetWebVrMode(JNIEnv* env, |
| 94 const base::android::JavaParamRef<jobject>& obj, | 94 const base::android::JavaParamRef<jobject>& obj, |
| 95 bool enabled); | 95 bool enabled); |
| 96 | 96 |
| 97 void ContentWebContentsDestroyed(); | 97 void ContentWebContentsDestroyed(); |
| 98 // Called when our WebContents have been hidden. Usually a sign that something |
| 99 // like another tab placed in front of it. |
| 100 void ContentWasHidden(); |
| 98 | 101 |
| 99 // html/js UI hooks. | 102 // html/js UI hooks. |
| 100 static base::WeakPtr<VrShell> GetWeakPtr( | 103 static base::WeakPtr<VrShell> GetWeakPtr( |
| 101 const content::WebContents* web_contents); | 104 const content::WebContents* web_contents); |
| 102 UiScene* GetScene(); | 105 UiScene* GetScene(); |
| 103 UiInterface* GetUiInterface(); | 106 UiInterface* GetUiInterface(); |
| 104 void OnDomContentsLoaded(); | 107 void OnDomContentsLoaded(); |
| 105 | 108 |
| 106 // device::GvrDelegate implementation | 109 // device::GvrDelegate implementation |
| 107 void SetWebVRSecureOrigin(bool secure_origin) override; | 110 void SetWebVRSecureOrigin(bool secure_origin) override; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 242 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 240 | 243 |
| 241 DISALLOW_COPY_AND_ASSIGN(VrShell); | 244 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 242 }; | 245 }; |
| 243 | 246 |
| 244 bool RegisterVrShell(JNIEnv* env); | 247 bool RegisterVrShell(JNIEnv* env); |
| 245 | 248 |
| 246 } // namespace vr_shell | 249 } // namespace vr_shell |
| 247 | 250 |
| 248 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 251 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |