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

Unified Diff: ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm

Issue 2930763003: [iOS Clean] Added HTTP authentication dialog support.
Patch Set: rebase && Mark's comments 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 | « ios/clean/chrome/browser/ui/web_contents/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
diff --git a/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm b/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
index 9b8f4ed7780d27f6d3cc03c39a693d3639a13bba..70aaafda0634965d9ff1e645f519ce270030e4fa 100644
--- a/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
+++ b/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
@@ -9,6 +9,8 @@
#import "ios/clean/chrome/browser/ui/commands/context_menu_commands.h"
#import "ios/clean/chrome/browser/ui/context_menu/context_menu_context_impl.h"
#import "ios/clean/chrome/browser/ui/context_menu/web_context_menu_coordinator.h"
+#import "ios/clean/chrome/browser/ui/dialogs/http_auth_dialogs/http_auth_dialog_coordinator.h"
+#import "ios/clean/chrome/browser/ui/dialogs/http_auth_dialogs/http_auth_dialog_request.h"
#import "ios/clean/chrome/browser/ui/overlay_service/browser_coordinator+overlay_support.h"
#import "ios/clean/chrome/browser/ui/overlay_service/overlay_service.h"
#import "ios/clean/chrome/browser/ui/web_contents/web_contents_mediator.h"
@@ -123,4 +125,19 @@ - (BOOL)webState:(web::WebState*)webState
return YES;
}
+- (void)webState:(web::WebState*)webState
+ didRequestHTTPAuthForProtectionSpace:(NSURLProtectionSpace*)protectionSpace
+ proposedCredential:(NSURLCredential*)proposedCredential
+ completionHandler:(void (^)(NSString* username,
+ NSString* password))handler {
+ HTTPAuthDialogRequest* request =
+ [HTTPAuthDialogRequest stateWithWebState:webState
+ protectionSpace:protectionSpace
+ credential:proposedCredential
+ callback:handler];
+ HTTPAuthDialogCoordinator* dialogCoordinator =
+ [[HTTPAuthDialogCoordinator alloc] initWithRequest:request];
+ self.overlayService->ShowOverlayForWebState(dialogCoordinator, webState);
+}
+
@end
« no previous file with comments | « ios/clean/chrome/browser/ui/web_contents/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698