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

Unified Diff: ios/web/web_state/web_state_delegate_bridge.mm

Issue 2642233004: Removed Form Resubmission callback from CRWWebDelegate. (Closed)
Patch Set: Added ShowRepostFormWarningWithNoDelegateMethod test Created 3 years, 11 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/web_state_delegate.mm ('k') | ios/web/web_state/web_state_delegate_bridge_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/web_state_delegate_bridge.mm
diff --git a/ios/web/web_state/web_state_delegate_bridge.mm b/ios/web/web_state/web_state_delegate_bridge.mm
index 695410ae94365af1561fc7adb3db7463ac7e930c..1b80609d9dbd2501bfa6def4d5c396f0e0330f20 100644
--- a/ios/web/web_state/web_state_delegate_bridge.mm
+++ b/ios/web/web_state/web_state_delegate_bridge.mm
@@ -37,6 +37,21 @@ bool WebStateDelegateBridge::HandleContextMenu(
return NO;
}
+void WebStateDelegateBridge::ShowRepostFormWarningDialog(
+ WebState* source,
+ const base::Callback<void(bool)>& callback) {
+ base::Callback<void(bool)> local_callback(callback);
+ SEL selector = @selector(webState:runRepostFormDialogWithCompletionHandler:);
+ if ([delegate_ respondsToSelector:selector]) {
+ [delegate_ webState:source
+ runRepostFormDialogWithCompletionHandler:^(BOOL should_continue) {
+ local_callback.Run(should_continue);
+ }];
+ } else {
+ local_callback.Run(true);
+ }
+}
+
JavaScriptDialogPresenter* WebStateDelegateBridge::GetJavaScriptDialogPresenter(
WebState* source) {
SEL selector = @selector(javaScriptDialogPresenterForWebState:);
« no previous file with comments | « ios/web/web_state/web_state_delegate.mm ('k') | ios/web/web_state/web_state_delegate_bridge_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698