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

Unified Diff: ios/web/public/web_state/web_state_delegate_bridge.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/web_state/web_state_delegate.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('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_bridge.h
diff --git a/ios/web/public/web_state/web_state_delegate_bridge.h b/ios/web/public/web_state/web_state_delegate_bridge.h
index d43e6077cf0388d649ec0b4e0acfbf801b97bb03..3826edfb6d7914d5c296812a6bb3a18c6f33c44c 100644
--- a/ios/web/public/web_state/web_state_delegate_bridge.h
+++ b/ios/web/public/web_state/web_state_delegate_bridge.h
@@ -25,6 +25,11 @@
- (BOOL)webState:(web::WebState*)webState
handleContextMenu:(const web::ContextMenuParams&)params;
+// Returns a pointer to a service to manage dialogs. May return null in which
+// case dialogs aren't shown.
+- (web::JavaScriptDialogPresenter*)javaScriptDialogPresenterForWebState:
+ (web::WebState*)webState;
+
@end
namespace web {
@@ -39,6 +44,8 @@ class WebStateDelegateBridge : public web::WebStateDelegate {
void LoadProgressChanged(WebState* source, double progress) override;
bool HandleContextMenu(WebState* source,
const ContextMenuParams& params) override;
+ JavaScriptDialogPresenter* GetJavaScriptDialogPresenter(
+ WebState* source) override;
private:
// CRWWebStateDelegate which receives forwarded calls.
« no previous file with comments | « ios/web/public/web_state/web_state_delegate.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698