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

Unified Diff: ios/web/web_state/web_state_impl.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: Cleanup. 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
Index: ios/web/web_state/web_state_impl.h
diff --git a/ios/web/web_state/web_state_impl.h b/ios/web/web_state/web_state_impl.h
index 776416c8e6baf81801535d5ca304b9a8be403ef4..37501fe3a27a20df993a2121a44375894bb56b7a 100644
--- a/ios/web/web_state/web_state_impl.h
+++ b/ios/web/web_state/web_state_impl.h
@@ -20,6 +20,8 @@
#include "ios/web/navigation/navigation_manager_delegate.h"
#include "ios/web/navigation/navigation_manager_impl.h"
#include "ios/web/net/request_tracker_impl.h"
+#include "ios/web/public/javascript_dialog_callback.h"
+#include "ios/web/public/javascript_dialog_type.h"
#include "ios/web/public/web_state/web_state.h"
#include "url/gurl.h"
@@ -267,6 +269,17 @@ class WebStateImpl : public WebState, public NavigationManagerDelegate {
// Notifies the delegate that a context menu needs handling.
bool HandleContextMenu(const ContextMenuParams& params);
+ // Notifies the delegate that a Javascript dialog needs to be presented.
Eugene But (OOO till 7-30) 2016/06/27 21:09:37 NIT: s/Javascript/JavaScript
michaeldo 2016/06/27 22:25:10 Done.
+ void RunJavaScriptDialog(const GURL& origin,
+ JavaScriptDialogType javascript_dialog_type,
Eugene But (OOO till 7-30) 2016/06/27 21:09:37 NIT: s/javascript_dialog_type/java_script_dialog_t
michaeldo 2016/06/27 22:25:10 Done.
+ NSString* message_text,
+ NSString* default_prompt_text,
+ const DialogClosedCallback& callback);
+
+ // Cancels the display of any currently displayed dialog and any queued
Eugene But (OOO till 7-30) 2016/06/27 21:09:37 Please do not make assumptions that dialogs are qu
michaeldo 2016/06/27 22:25:10 Done.
+ // dialogs.
+ void CancelActiveAndPendingDialogs();
+
// NavigationManagerDelegate:
void NavigateToPendingEntry() override;
void LoadURLWithParams(const NavigationManager::WebLoadParams&) override;

Powered by Google App Engine
This is Rietveld 408576698