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

Unified Diff: ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm

Issue 2928723002: [iOS Clean] Added JavaScript dialog support.
Patch Set: rebase & Mark's comments Created 3 years, 6 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/clean/chrome/browser/ui/web_contents/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
diff --git a/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm b/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
index 9b8f4ed7780d27f6d3cc03c39a693d3639a13bba..fef3fddfde4291fdc7852e163f312f5a08823ba9 100644
--- a/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
+++ b/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
@@ -9,6 +9,7 @@
#import "ios/clean/chrome/browser/ui/commands/context_menu_commands.h"
#import "ios/clean/chrome/browser/ui/context_menu/context_menu_context_impl.h"
#import "ios/clean/chrome/browser/ui/context_menu/web_context_menu_coordinator.h"
+#import "ios/clean/chrome/browser/ui/dialogs/java_script_dialogs/java_script_dialog_overlay_presenter.h"
#import "ios/clean/chrome/browser/ui/overlay_service/browser_coordinator+overlay_support.h"
#import "ios/clean/chrome/browser/ui/overlay_service/overlay_service.h"
#import "ios/clean/chrome/browser/ui/web_contents/web_contents_mediator.h"
@@ -112,6 +113,13 @@ - (void)openContextMenuImage:(ContextMenuContext*)context {
#pragma mark - CRWWebStateDelegate
+- (web::JavaScriptDialogPresenter*)javaScriptDialogPresenterForWebState:
+ (web::WebState*)webState {
+ JavaScriptDialogOverlayPresenter::CreateForWebState(self.webState,
+ self.overlayService);
+ return JavaScriptDialogOverlayPresenter::FromWebState(webState);
+}
+
- (BOOL)webState:(web::WebState*)webState
handleContextMenu:(const web::ContextMenuParams&)params {
ContextMenuContextImpl* context =
« no previous file with comments | « ios/clean/chrome/browser/ui/web_contents/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698