Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2542293002: Exit VR when our main content tab is hidden (Usually due to links opening in new tab) (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698