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 |