| 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..87b04a0c5a058351563a023309b31cc64a5d1a97 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,6 +1229,9 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
|
| maybeRemoveWindowBackground();
|
| DownloadManagerService.getDownloadManagerService().onActivityLaunched();
|
|
|
| + if (getSavedInstanceState() == null && getIntent() != null) {
|
| + VrShellDelegate.onNewIntentWithNative(this, getIntent());
|
| + }
|
| VrShellDelegate.onNativeLibraryAvailable();
|
| super.finishNativeInitialization();
|
| }
|
|
|