Commit 1bf8f800 authored by Michael Thiessen's avatar Michael Thiessen Committed by Commit Bot

Don't show AppBanner while in VR.

Note that this doesn't handle the case where the banner is already open
when entering VR. That's complicated and I'm not going to try to merge
a fix for that back to M67.

(This CL is targeted for M67)

Bug: 840811
Change-Id: I9e4daba4baeed7aeb8f5b841fdb7acb1f7872ff7
Reviewed-on: https://chromium-review.googlesource.com/1052211
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557248}
parent cfc7e69c
......@@ -13,6 +13,7 @@ import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ShortcutHelper;
import org.chromium.chrome.browser.vr_shell.VrShellDelegate;
import org.chromium.chrome.browser.webapps.AddToHomescreenDialog;
import org.chromium.content_public.browser.WebContents;
......@@ -44,6 +45,8 @@ public class AppBannerManager {
* @return true if add to home screen is supported, false otherwise.
*/
public static boolean isSupported() {
// TODO(mthiesse, https://crbug.com/840811): Support the app banner dialog in VR.
if (VrShellDelegate.isInVr()) return false;
if (sIsSupported == null) {
sIsSupported = ShortcutHelper.isAddToHomeIntentSupported();
}
......
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