Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Unified Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 2958533003: Disable Credential management API dialog in VR mode (Closed)
Patch Set: removing an unnecessary whitespace change Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/chrome_password_manager_client.cc
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
index 19e3d7e39e71d8f6abe01bd81df5fc9b6e961bd2..52288f8a5cfa91a33672fe3cf28f5dbf806484aa 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -88,6 +88,11 @@
#include "extensions/common/constants.h"
#endif
+#include "device/vr/features/features.h"
+#if BUILDFLAG(ENABLE_VR)
+#include "chrome/browser/android/vr_shell/vr_tab_helper.h"
+#endif // BUILDFLAG(ENABLE_VR)
+
using password_manager::ContentPasswordManagerDriverFactory;
using password_manager::PasswordManagerInternalsService;
using sessions::SerializedNavigationEntry;
@@ -209,6 +214,14 @@ bool ChromePasswordManagerClient::IsPasswordManagementEnabledForCurrentPage()
is_enabled =
entry->GetURL().host_piece() != chrome::kChromeUIChromeSigninHost;
}
+
+#if BUILDFLAG(ENABLE_VR)
+ // The password manager is disabled while VR (virtual reality) is being used,
+ // as the use of conventional UI elements might harm the user experience in
+ // VR.
+ is_enabled = is_enabled && !vr_shell::VrTabHelper::IsInVr(web_contents());
+#endif // BUILDFLAG(ENABLE_VR)
+
if (log_manager_->IsLoggingActive()) {
password_manager::BrowserSavePasswordProgressLogger logger(
log_manager_.get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698