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

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2755013002: Removed webControllerDidSuppressDialog: callback. (Closed)
Patch Set: Self review Created 3 years, 9 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/web/web_state/ui/crw_web_controller.h ('k') | ios/web/web_state/ui/crw_web_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index 57f7a44c7867669896bdf8f4be877c6924f42bac..d57540603fed095a9fb2589ab9076a0eaa335953 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -737,9 +737,6 @@ typedef void (^ViewportStateCompletion)(const web::PageViewportState*);
- (BOOL)urlTriggersNativeAppLaunch:(const GURL&)URL
sourceURL:(const GURL&)sourceURL
linkActivatedNavigation:(BOOL)linkActivatedNavigation;
-// Called when a JavaScript dialog, HTTP authentication dialog or window.open
-// call has been suppressed.
-- (void)didSuppressDialog;
// Returns YES if the navigation action is associated with a main frame request.
- (BOOL)isMainFrameNavigationAction:(WKNavigationAction*)action;
// Returns whether external URL navigation action should be opened.
@@ -2610,7 +2607,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
- (BOOL)handleGeolocationDialogSuppressedMessage:(base::DictionaryValue*)message
context:(NSDictionary*)context {
- [self didSuppressDialog];
+ _webStateImpl->OnDialogSuppressed();
return YES;
}
@@ -3401,7 +3398,9 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
[space.authenticationMethod isEqual:NSURLAuthenticationMethodHTTPDigest]);
if (self.shouldSuppressDialogs) {
- [self didSuppressDialog];
+ // TODO(crbug.com/702381): Web Controller should not assume that embedder
+ // handles HTTP Authentication by showing the dialog.
+ _webStateImpl->OnDialogSuppressed();
completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, nil);
return;
}
@@ -3443,7 +3442,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
completion:(void (^)(BOOL, NSString*))completionHandler {
DCHECK(completionHandler);
if (self.shouldSuppressDialogs) {
- [self didSuppressDialog];
+ _webStateImpl->OnDialogSuppressed();
completionHandler(NO, nil);
return;
}
@@ -3928,11 +3927,6 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
linkClicked:linkClicked];
}
-- (void)didSuppressDialog {
- if ([_delegate respondsToSelector:@selector(webControllerDidSuppressDialog:)])
- [_delegate webControllerDidSuppressDialog:self];
-}
-
- (BOOL)isMainFrameNavigationAction:(WKNavigationAction*)action {
if (action.targetFrame) {
return action.targetFrame.mainFrame;
@@ -4311,7 +4305,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
forNavigationAction:(WKNavigationAction*)action
windowFeatures:(WKWindowFeatures*)windowFeatures {
if (self.shouldSuppressDialogs) {
- [self didSuppressDialog];
+ _webStateImpl->OnDialogSuppressed();
return nil;
}
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.h ('k') | ios/web/web_state/ui/crw_web_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698