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

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

Issue 2969923002: [vr] Hide 2D UI when entering VR for WebVR auto-presentation (Closed)
Patch Set: address mthiesse's review comments Created 3 years, 5 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 69a2e0afb71488c289c7bb44ec46d1ec3e7f597f..1a0c887581d12fd3596d50ddf42cd45c7a31d350 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -330,6 +330,11 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
public void postInflationStartup() {
super.postInflationStartup();
+ Intent intent = getIntent();
+ if (intent != null && getSavedInstanceState() == null) {
+ VrShellDelegate.maybeHandleVrIntentPreNative(this, intent);
+ }
+
mSnackbarManager = new SnackbarManager(this, null);
mDataUseSnackbarController = new DataUseSnackbarController(this, getSnackbarManager());
@@ -913,6 +918,12 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
super.onStopWithNative();
}
+ @Override
+ protected void onNewIntent(Intent intent) {
+ super.onNewIntent(intent);
+ VrShellDelegate.maybeHandleVrIntentPreNative(this, intent);
+ }
+
@Override
public void onNewIntentWithNative(Intent intent) {
mPictureInPictureController.cleanup(this);
@@ -920,6 +931,9 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
super.onNewIntentWithNative(intent);
if (mIntentHandler.shouldIgnoreIntent(intent)) return;
+ // We send this intent so that we can enter WebVr presentation mode if needed. This
+ // call doesn't consume the intent because it also has the url that we need to load.
+ VrShellDelegate.onNewIntentWithNative(this, intent);
mIntentHandler.onNewIntent(intent);
}
@@ -1215,7 +1229,8 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
maybeRemoveWindowBackground();
DownloadManagerService.getDownloadManagerService().onActivityLaunched();
- VrShellDelegate.onNativeLibraryAvailable();
+ Intent intent = getSavedInstanceState() == null ? getIntent() : null;
+ VrShellDelegate.onNativeLibraryAvailable(this, intent);
Ted C 2017/07/14 00:12:05 I'd recommend not passing the intent in this call,
ymalik 2017/07/14 05:27:43 Thanks, Done.
super.finishNativeInitialization();
}
« no previous file with comments | « no previous file | 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