Commit c9597eb1 authored by Amirhossein Simjour's avatar Amirhossein Simjour Committed by Commit Bot

VR: enable autofill when vr-browsing-native-android-ui is enabled

VR wants to support autofill popup behind a flag.
We can remove the check completely when the flag is removed.

Bug: 819881
Change-Id: I390a6fd425b81238f255d85dc84f18e41291828e
Reviewed-on: https://chromium-review.googlesource.com/992889Reviewed-by: default avatarMathieu Perreault <mathp@chromium.org>
Commit-Queue: Amirhossein Simjour <asimjour@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548289}
parent abcbc535
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
#include "chrome/browser/android/chrome_feature_list.h"
#include "chrome/browser/android/preferences/preferences_launcher.h" #include "chrome/browser/android/preferences/preferences_launcher.h"
#include "chrome/browser/android/signin/signin_promo_util_android.h" #include "chrome/browser/android/signin/signin_promo_util_android.h"
#include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/infobars/infobar_service.h"
...@@ -428,10 +429,14 @@ void ChromeAutofillClient::ShowHttpNotSecureExplanation() { ...@@ -428,10 +429,14 @@ void ChromeAutofillClient::ShowHttpNotSecureExplanation() {
bool ChromeAutofillClient::IsAutofillSupported() { bool ChromeAutofillClient::IsAutofillSupported() {
// VR browsing does not support popups at the moment. // VR browsing does not support popups at the moment.
if (vr::VrTabHelper::IsInVr(web_contents())) { #if defined(OS_ANDROID)
if (vr::VrTabHelper::IsInVr(web_contents()) &&
!base::FeatureList::IsEnabled(
chrome::android::kVrBrowsingNativeAndroidUi)) {
vr::VrTabHelper::UISuppressed(vr::UiSuppressedElement::kAutofill); vr::VrTabHelper::UISuppressed(vr::UiSuppressedElement::kAutofill);
return false; return false;
} }
#endif
return true; return true;
} }
......
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