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

Side by Side Diff: ios/chrome/browser/ui/browser_view_controller.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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/ui/BUILD.gn ('k') | ios/web/public/test/fakes/test_web_state_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/chrome/browser/ui/browser_view_controller.h" 5 #import "ios/chrome/browser/ui/browser_view_controller.h"
6 6
7 #import <AssetsLibrary/AssetsLibrary.h> 7 #import <AssetsLibrary/AssetsLibrary.h>
8 #import <MobileCoreServices/MobileCoreServices.h> 8 #import <MobileCoreServices/MobileCoreServices.h>
9 #import <PassKit/PassKit.h> 9 #import <PassKit/PassKit.h>
10 #import <Photos/Photos.h> 10 #import <Photos/Photos.h>
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 #include "ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h" 140 #include "ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h"
141 #include "ios/chrome/browser/ui/toolbar/toolbar_model_ios.h" 141 #include "ios/chrome/browser/ui/toolbar/toolbar_model_ios.h"
142 #import "ios/chrome/browser/ui/tools_menu/tools_menu_context.h" 142 #import "ios/chrome/browser/ui/tools_menu/tools_menu_context.h"
143 #import "ios/chrome/browser/ui/tools_menu/tools_menu_view_item.h" 143 #import "ios/chrome/browser/ui/tools_menu/tools_menu_view_item.h"
144 #import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h" 144 #import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h"
145 #include "ios/chrome/browser/ui/ui_util.h" 145 #include "ios/chrome/browser/ui/ui_util.h"
146 #import "ios/chrome/browser/ui/uikit_ui_util.h" 146 #import "ios/chrome/browser/ui/uikit_ui_util.h"
147 #import "ios/chrome/browser/ui/voice/text_to_speech_player.h" 147 #import "ios/chrome/browser/ui/voice/text_to_speech_player.h"
148 #include "ios/chrome/browser/upgrade/upgrade_center.h" 148 #include "ios/chrome/browser/upgrade/upgrade_center.h"
149 #import "ios/chrome/browser/web/error_page_content.h" 149 #import "ios/chrome/browser/web/error_page_content.h"
150 #import "ios/chrome/browser/web/form_resubmission_tab_helper.h"
150 #import "ios/chrome/browser/web/passkit_dialog_provider.h" 151 #import "ios/chrome/browser/web/passkit_dialog_provider.h"
151 #import "ios/chrome/browser/xcallback_parameters.h" 152 #import "ios/chrome/browser/xcallback_parameters.h"
152 #import "ios/chrome/common/material_timing.h" 153 #import "ios/chrome/common/material_timing.h"
153 #include "ios/chrome/grit/ios_chromium_strings.h" 154 #include "ios/chrome/grit/ios_chromium_strings.h"
154 #include "ios/chrome/grit/ios_strings.h" 155 #include "ios/chrome/grit/ios_strings.h"
155 #import "ios/net/request_tracker.h" 156 #import "ios/net/request_tracker.h"
156 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" 157 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
157 #include "ios/public/provider/chrome/browser/ui/app_rating_prompt.h" 158 #include "ios/public/provider/chrome/browser/ui/app_rating_prompt.h"
158 #include "ios/public/provider/chrome/browser/ui/default_ios_web_view_factory.h" 159 #include "ios/public/provider/chrome/browser/ui/default_ios_web_view_factory.h"
159 #import "ios/public/provider/chrome/browser/voice/voice_search_bar.h" 160 #import "ios/public/provider/chrome/browser/voice/voice_search_bar.h"
(...skipping 2402 matching lines...) Expand 10 before | Expand all | Expand 10 after
2562 [weakSelf searchByImageAtURL:imageUrl referrer:referrer]; 2563 [weakSelf searchByImageAtURL:imageUrl referrer:referrer];
2563 }; 2564 };
2564 [_contextMenuCoordinator addItemWithTitle:title action:action]; 2565 [_contextMenuCoordinator addItemWithTitle:title action:action];
2565 } 2566 }
2566 } 2567 }
2567 2568
2568 [_contextMenuCoordinator start]; 2569 [_contextMenuCoordinator start];
2569 return YES; 2570 return YES;
2570 } 2571 }
2571 2572
2573 - (void)webState:(web::WebState*)webState
2574 runRepostFormDialogWithCompletionHandler:(void (^)(BOOL))handler {
2575 // Display the action sheet with the arrow pointing at the top center of the
2576 // web contents.
2577 UIView* view = webState->GetView();
2578 CGPoint dialogLocation =
2579 CGPointMake(CGRectGetMidX(view.frame),
2580 CGRectGetMinY(view.frame) +
2581 [self headerHeightForTab:[self tabForWebState:webState]]);
2582 auto helper = FormResubmissionTabHelper::FromWebState(webState);
2583 helper->PresentFormResubmissionDialog(dialogLocation,
2584 base::BindBlock(^(bool shouldContinue) {
2585 handler(shouldContinue);
2586 }));
2587 }
2588
2572 - (web::JavaScriptDialogPresenter*)javaScriptDialogPresenterForWebState: 2589 - (web::JavaScriptDialogPresenter*)javaScriptDialogPresenterForWebState:
2573 (web::WebState*)webState { 2590 (web::WebState*)webState {
2574 return _javaScriptDialogPresenter.get(); 2591 return _javaScriptDialogPresenter.get();
2575 } 2592 }
2576 2593
2577 - (void)webState:(web::WebState*)webState 2594 - (void)webState:(web::WebState*)webState
2578 didRequestHTTPAuthForProtectionSpace:(NSURLProtectionSpace*)protectionSpace 2595 didRequestHTTPAuthForProtectionSpace:(NSURLProtectionSpace*)protectionSpace
2579 proposedCredential:(NSURLCredential*)proposedCredential 2596 proposedCredential:(NSURLCredential*)proposedCredential
2580 completionHandler:(void (^)(NSString* username, 2597 completionHandler:(void (^)(NSString* username,
2581 NSString* password))handler { 2598 NSString* password))handler {
(...skipping 2556 matching lines...) Expand 10 before | Expand all | Expand 10 after
5138 5155
5139 - (UIView*)voiceSearchButton { 5156 - (UIView*)voiceSearchButton {
5140 return _voiceSearchButton; 5157 return _voiceSearchButton;
5141 } 5158 }
5142 5159
5143 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5160 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5144 return [self currentLogoAnimationControllerOwner]; 5161 return [self currentLogoAnimationControllerOwner];
5145 } 5162 }
5146 5163
5147 @end 5164 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/BUILD.gn ('k') | ios/web/public/test/fakes/test_web_state_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698