Commit 931b0527 authored by billorr's avatar billorr Committed by Commit bot

Ensure the address bar continues to show after dismissing WebVR.

When WebVR presentation exits, the address bar is sometimes hidden.  This is because when we enter VR, the browser controls try to animate out to hidden.  The animation doesn't actually render any frames because we block vsync.

We were trying to make the controls visible by calling mActivity.getFullscreenManager().setPositionsForTabToNonFullscreen, which targets pretty low in the stack for whether the controls should be visible (for the next rendered frame), but higher level components still think the controls are not visible.  We should call mTab.updateBrowserControlsState(BrowserControlsState.SHOWN, true); instead to mark the controls visible at a higher level in the stack so components throughout the stack agree on control visibility.

BUG=715182

Review-Url: https://codereview.chromium.org/2903443002
Cr-Commit-Position: refs/heads/master@{#474007}
parent bdbf9cf9
......@@ -904,7 +904,6 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
mVrShell.pause();
removeVrViews();
destroyVrShell();
mActivity.getFullscreenManager().setPositionsForTabToNonFullscreen();
if (disableVrMode) mVrClassesWrapper.setVrModeEnabled(mActivity, false);
promptForFeedbackIfNeeded(stayingInChrome);
......
......@@ -43,6 +43,7 @@ import org.chromium.content.browser.MotionEventSynthesizer;
import org.chromium.content.browser.WindowAndroidChangedObserver;
import org.chromium.content.browser.WindowAndroidProvider;
import org.chromium.content_public.browser.WebContents;
import org.chromium.content_public.common.BrowserControlsState;
import org.chromium.ui.UiUtils;
import org.chromium.ui.base.WindowAndroid;
import org.chromium.ui.display.DisplayAndroid;
......@@ -448,6 +449,11 @@ public class VrShellImpl
mTabModelSelectorTabObserver.destroy();
mTab.removeObserver(mTabObserver);
restoreTabFromVR();
if (mTab != null) {
mTab.updateBrowserControlsState(BrowserControlsState.SHOWN, true);
}
mContentVirtualDisplay.destroy();
super.shutdown();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment