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

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

Issue 2776243007: Enable WebVR presentation from Chrome Custom Tab (Closed)
Patch Set: rebase + address nit Created 3 years, 8 months 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/ChromeActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
index 3fae79dcb05d0f96dbc08fed14bb14a29d5c5485..aff7e4b04c04b60826f5813a833289b50048da1a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -853,7 +853,7 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
MultiWindowUtils.getInstance().isInMultiWindowMode(this));
VideoPersister.getInstance().cleanup(this);
- VrShellDelegate.maybeRegisterVREntryHook(this);
+ VrShellDelegate.maybeRegisterVrEntryHook(this);
}
@Override
@@ -869,7 +869,7 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
if (tab != null) getTabContentManager().cacheTabThumbnail(tab);
ContentViewCore cvc = getContentViewCore();
if (cvc != null) cvc.onPause();
- VrShellDelegate.maybeUnregisterVREntryHook(this);
+ VrShellDelegate.maybeUnregisterVrEntryHook(this);
markSessionEnd();
super.onPauseWithNative();
}
@@ -2131,15 +2131,25 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
}
}
+ @Override
+ public boolean onActivityResultWithNative(int requestCode, int resultCode, Intent intent) {
+ if (super.onActivityResultWithNative(requestCode, resultCode, intent)) return true;
+ if (requestCode == VrShellDelegate.EXIT_VR_RESULT) {
+ VrShellDelegate.onExitVrResult(resultCode);
+ return true;
+ }
+ return false;
+ }
+
/**
* Called when VR mode is entered using this activity. 2D UI components that steal focus or
* draw over VR contents should be hidden in this call.
*/
- public void onEnterVR() {}
+ public void onEnterVr() {}
/**
* Called when VR mode using this activity is exited. Any state set for VR should be restored
* in this call, including showing 2D UI that was hidden.
*/
- public void onExitVR() {}
+ public void onExitVr() {}
}
« no previous file with comments | « chrome/android/java/AndroidManifest.xml ('k') | chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698