Commit 22dc6d72 authored by Yash Malik's avatar Yash Malik Committed by Commit Bot

VR: Disable all autofill popups when in VR mode.

Bug: 817127
Change-Id: I30343146b3fe8f84cf04bf7fe68fd330fa12f48c
Reviewed-on: https://chromium-review.googlesource.com/952194
Commit-Queue: Yash Malik <ymalik@chromium.org>
Reviewed-by: default avatarSebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541655}
parent 498a087c
...@@ -253,6 +253,11 @@ void ChromeAutofillClient::ShowAutofillPopup( ...@@ -253,6 +253,11 @@ void ChromeAutofillClient::ShowAutofillPopup(
base::i18n::TextDirection text_direction, base::i18n::TextDirection text_direction,
const std::vector<autofill::Suggestion>& suggestions, const std::vector<autofill::Suggestion>& suggestions,
base::WeakPtr<AutofillPopupDelegate> delegate) { base::WeakPtr<AutofillPopupDelegate> delegate) {
// TODO(https://crbug.com/779126): We currently don't support rendering popups
// while in VR, so we just don't show it.
if (!IsAutofillSupported())
return;
// Convert element_bounds to be in screen space. // Convert element_bounds to be in screen space.
gfx::Rect client_area = web_contents()->GetContainerBounds(); gfx::Rect client_area = web_contents()->GetContainerBounds();
gfx::RectF element_bounds_in_screen_space = gfx::RectF element_bounds_in_screen_space =
......
...@@ -640,8 +640,7 @@ void AutofillManager::OnQueryFormFieldAutofillImpl( ...@@ -640,8 +640,7 @@ void AutofillManager::OnQueryFormFieldAutofillImpl(
} }
// Show a "Payment not secure" message. // Show a "Payment not secure" message.
if (client_->IsAutofillSupported() && !is_context_secure && if (!is_context_secure && is_filling_credit_card && is_http_warning_enabled) {
is_filling_credit_card && is_http_warning_enabled) {
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
if (!suggestions.empty()) { if (!suggestions.empty()) {
suggestions.insert(suggestions.begin(), Suggestion()); suggestions.insert(suggestions.begin(), Suggestion());
......
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