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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Issue 2509083002: Adding an explicit listener for the VR mode close button (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
index 6ce254485561d69df4741de6dadc23831af663dc..ef9ef1a352aae00ed4750ad41c7a3d7fdc330a5e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
@@ -161,6 +161,12 @@ public class VrShellDelegate {
mVrShell.initializeNative(mTab, this);
if (inWebVR) mVrShell.setWebVrModeEnabled(true);
mVrShell.setVrModeEnabled(true);
+ mVrShell.setCloseButtonListener(new Runnable() {
+ @Override
+ public void run() {
+ exitVRIfNecessary();
+ }
+ });
// onResume needs to be called on GvrLayout after initialization to make sure DON flow work
// properly.
mVrShell.resume();

Powered by Google App Engine
This is Rietveld 408576698