Make the default alert() do nothing.

This commit is contained in:
Cheng Zhao 2014-03-01 19:53:50 +08:00
parent 8404389a31
commit 4c8e483bc1
2 changed files with 13 additions and 1 deletions

View file

@ -8,6 +8,18 @@
namespace atom {
void AtomJavaScriptDialogManager::RunJavaScriptDialog(
content::WebContents* web_contents,
const GURL& origin_url,
const std::string& accept_lang,
content::JavaScriptMessageType javascript_message_type,
const string16& message_text,
const string16& default_prompt_text,
const DialogClosedCallback& callback,
bool* did_suppress_message) {
callback.Run(false, string16());
}
void AtomJavaScriptDialogManager::RunBeforeUnloadDialog(
content::WebContents* web_contents,
const string16& message_text,

View file

@ -20,7 +20,7 @@ class AtomJavaScriptDialogManager : public content::JavaScriptDialogManager {
const string16& message_text,
const string16& default_prompt_text,
const DialogClosedCallback& callback,
bool* did_suppress_message) OVERRIDE {}
bool* did_suppress_message) OVERRIDE;
virtual void RunBeforeUnloadDialog(
content::WebContents* web_contents,
const string16& message_text,