bool ChromeClient::openJavaScriptPrompt(LocalFrame* frame, const String& prompt, const String& defaultValue, String& result) { ASSERT(frame); if (!canOpenModalIfDuringPageDismissal(frame->tree().top(), ChromeClient::PromptDialog, prompt)) return false; return openJavaScriptDialog(this, &ChromeClient::openJavaScriptPromptDelegate, *frame, prompt, ChromeClient::PromptDialog, defaultValue, result); }
bool ChromeClient::openJavaScriptConfirm(LocalFrame* frame, const String& message) { ASSERT(frame); if (!canOpenModalIfDuringPageDismissal(frame->tree().top(), ChromeClient::ConfirmDialog, message)) return false; return openJavaScriptDialog(this, &ChromeClient::openJavaScriptConfirmDelegate, *frame, message, ChromeClient::ConfirmDialog); }
bool ChromeClient::openJavaScriptAlert(LocalFrame* frame, const String& message) { ASSERT(frame); if (!canOpenModalIfDuringPageDismissal(frame->tree().top(), ChromeClient::AlertDialog, message)) return false; return openJavaScriptDialog( frame, message, ChromeClient::AlertDialog, [this, frame, &message]() { return openJavaScriptAlertDelegate(frame, message); }); }