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

Side by Side Diff: ios/web/web_state/ui/crw_wk_web_view_web_controller.mm

Issue 1504493002: Added |-cancelJavaScriptDialogsForWebController:| to UI delegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.h" 5 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #include "base/containers/mru_cache.h" 9 #include "base/containers/mru_cache.h"
10 #include "base/ios/ios_util.h" 10 #include "base/ios/ios_util.h"
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 base::WeakNSObject<CRWWKWebViewWebController> weakSelf(self); 882 base::WeakNSObject<CRWWKWebViewWebController> weakSelf(self);
883 id crashHandler = ^{ 883 id crashHandler = ^{
884 [weakSelf webViewWebProcessDidCrash]; 884 [weakSelf webViewWebProcessDidCrash];
885 }; 885 };
886 return [[CRWWKWebViewCrashDetector alloc] initWithWebView:webView 886 return [[CRWWKWebViewCrashDetector alloc] initWithWebView:webView
887 crashHandler:crashHandler]; 887 crashHandler:crashHandler];
888 } 888 }
889 889
890 - (void)webViewWebProcessDidCrash { 890 - (void)webViewWebProcessDidCrash {
891 _webProcessIsDead = YES; 891 _webProcessIsDead = YES;
892 if ([self.UIDelegate
893 respondsToSelector:@selector(
Eugene But (OOO till 7-30) 2015/12/04 23:24:11 ditto
kkhorimoto 2015/12/10 01:27:32 Done.
894 cancelJavaScriptDialogsForWebController:)]) {
895 [self.UIDelegate cancelJavaScriptDialogsForWebController:self];
896 }
892 if ([self.delegate respondsToSelector: 897 if ([self.delegate respondsToSelector:
893 @selector(webControllerWebProcessDidCrash:)]) { 898 @selector(webControllerWebProcessDidCrash:)]) {
894 [self.delegate webControllerWebProcessDidCrash:self]; 899 [self.delegate webControllerWebProcessDidCrash:self];
895 } 900 }
896 } 901 }
897 902
898 - (void)queryPageReferrerPolicy:(void(^)(NSString*))responseHandler { 903 - (void)queryPageReferrerPolicy:(void(^)(NSString*))responseHandler {
899 DCHECK(responseHandler); 904 DCHECK(responseHandler);
900 [self evaluateJavaScript:@"__gCrWeb.getPageReferrerPolicy()" 905 [self evaluateJavaScript:@"__gCrWeb.getPageReferrerPolicy()"
901 stringResultHandler:^(NSString* referrer, NSError* error) { 906 stringResultHandler:^(NSString* referrer, NSError* error) {
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 runJavaScriptTextInputPanelWithPrompt:prompt 1882 runJavaScriptTextInputPanelWithPrompt:prompt
1878 defaultText:defaultText 1883 defaultText:defaultText
1879 requestURL:requestURL 1884 requestURL:requestURL
1880 completionHandler:completionHandler]; 1885 completionHandler:completionHandler];
1881 } else if (completionHandler) { 1886 } else if (completionHandler) {
1882 completionHandler(nil); 1887 completionHandler(nil);
1883 } 1888 }
1884 } 1889 }
1885 1890
1886 @end 1891 @end
OLDNEW
« ios/web/web_state/ui/crw_web_controller.mm ('K') | « ios/web/web_state/ui/crw_web_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698