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

Unified Diff: chrome/browser/ui/android/login_handler_android.cc

Issue 2895303005: Disable HTTP Auth dialog while in VR (Closed)
Patch Set: update whitespace Created 3 years, 7 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/ui/android/login_handler_android.cc
diff --git a/chrome/browser/ui/android/login_handler_android.cc b/chrome/browser/ui/android/login_handler_android.cc
index 4c0db8a326856858a84c4d0bed64bf4c6014fbdc..65e04b5b8384680edc432a5b5d1fb9673541701f 100644
--- a/chrome/browser/ui/android/login_handler_android.cc
+++ b/chrome/browser/ui/android/login_handler_android.cc
@@ -9,6 +9,12 @@
#include "base/logging.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
+
+#include "device/vr/features/features.h"
+#if BUILDFLAG(ENABLE_VR)
+#include "chrome/browser/android/vr_shell/vr_tab_helper.h"
+#endif // BUILDFLAG(ENABLE_VR)
+
#include "chrome/browser/ui/android/chrome_http_auth_handler.h"
#include "chrome/browser/ui/android/view_android_helper.h"
#include "content/public/browser/browser_thread.h"
@@ -50,9 +56,16 @@ class LoginHandlerAndroid : public LoginHandler {
ViewAndroidHelper* view_helper = ViewAndroidHelper::FromWebContents(
web_contents);
+#if BUILDFLAG(ENABLE_VR)
+ if (vr_shell::VrTabHelper::IsInVr(web_contents)) {
+ CancelAuth();
+ return;
+ }
+#endif
+
// Notify WindowAndroid that HTTP authentication is required.
- if (view_helper->GetViewAndroid()
- && view_helper->GetViewAndroid()->GetWindowAndroid()) {
+ if (view_helper->GetViewAndroid() &&
+ view_helper->GetViewAndroid()->GetWindowAndroid()) {
chrome_http_auth_handler_.reset(
new ChromeHttpAuthHandler(authority, explanation));
chrome_http_auth_handler_->Init();
« 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