Index: ios/web/public/web_state/web_state_delegate.h |
diff --git a/ios/web/public/web_state/web_state_delegate.h b/ios/web/public/web_state/web_state_delegate.h |
index bebe64ea8f2772c5c0b20606d9f05505decda7f5..dc492a8586c7aca32a7df51160fcd63ad81f8925 100644 |
--- a/ios/web/public/web_state/web_state_delegate.h |
+++ b/ios/web/public/web_state/web_state_delegate.h |
@@ -16,6 +16,7 @@ class SSLInfo; |
namespace web { |
struct ContextMenuParams; |
+class JavaScriptDialogPresenter; |
struct SSLStatus; |
class WebState; |
@@ -36,6 +37,12 @@ class WebStateDelegate { |
virtual bool HandleContextMenu(WebState* source, |
const ContextMenuParams& params); |
+ // Returns a pointer to a service to manage dialogs. May return nullptr in |
+ // which case dialogs aren't shown. |
+ // TODO(crbug.com/622084): Find better place for this method. |
+ virtual JavaScriptDialogPresenter* GetJavaScriptDialogPresenter( |
+ WebState* source); |
+ |
protected: |
virtual ~WebStateDelegate(); |