| Index: ios/chrome/browser/ui/browser_view_controller.mm
|
| diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
|
| index da9d2434e5333764648ae8be4ed2903a242da2bd..a18b31dafbd3c4877d07e74474d01bce09a321b1 100644
|
| --- a/ios/chrome/browser/ui/browser_view_controller.mm
|
| +++ b/ios/chrome/browser/ui/browser_view_controller.mm
|
| @@ -147,6 +147,7 @@
|
| #import "ios/chrome/browser/ui/voice/text_to_speech_player.h"
|
| #include "ios/chrome/browser/upgrade/upgrade_center.h"
|
| #import "ios/chrome/browser/web/error_page_content.h"
|
| +#import "ios/chrome/browser/web/form_resubmission_tab_helper.h"
|
| #import "ios/chrome/browser/web/passkit_dialog_provider.h"
|
| #import "ios/chrome/browser/xcallback_parameters.h"
|
| #import "ios/chrome/common/material_timing.h"
|
| @@ -2569,6 +2570,22 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
|
| return YES;
|
| }
|
|
|
| +- (void)webState:(web::WebState*)webState
|
| + runRepostFormDialogWithCompletionHandler:(void (^)(BOOL))handler {
|
| + // Display the action sheet with the arrow pointing at the top center of the
|
| + // web contents.
|
| + UIView* view = webState->GetView();
|
| + CGPoint dialogLocation =
|
| + CGPointMake(CGRectGetMidX(view.frame),
|
| + CGRectGetMinY(view.frame) +
|
| + [self headerHeightForTab:[self tabForWebState:webState]]);
|
| + auto helper = FormResubmissionTabHelper::FromWebState(webState);
|
| + helper->PresentFormResubmissionDialog(dialogLocation,
|
| + base::BindBlock(^(bool shouldContinue) {
|
| + handler(shouldContinue);
|
| + }));
|
| +}
|
| +
|
| - (web::JavaScriptDialogPresenter*)javaScriptDialogPresenterForWebState:
|
| (web::WebState*)webState {
|
| return _javaScriptDialogPresenter.get();
|
|
|