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

Unified Diff: ios/web/public/web_state/web_state_delegate.h

Issue 2074733002: Add public API for handling Javascript alerts and prompt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace BOOL with bool in unittest. Created 4 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/web/public/java_script_dialog_type.h ('k') | ios/web/public/web_state/web_state_delegate_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « ios/web/public/java_script_dialog_type.h ('k') | ios/web/public/web_state/web_state_delegate_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698