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

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

Issue 2642233004: Removed Form Resubmission callback from CRWWebDelegate. (Closed)
Patch Set: Addressed review comments 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
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) {
rohitrao (ping after 24h) 2017/01/24 14:15:13 This is a block that runs a callback that runs a b
Eugene But (OOO till 7-30) 2017/01/24 21:33:11 Well... Objective-C and C++ callback patterns are
+ local_callback.Run(should_continue);
+ }];
+ } else {
+ local_callback.Run(true);
+ }
+}
+
JavaScriptDialogPresenter* WebStateDelegateBridge::GetJavaScriptDialogPresenter(
WebState* source) {
SEL selector = @selector(javaScriptDialogPresenterForWebState:);

Powered by Google App Engine
This is Rietveld 408576698