Implement dialog (alert/confirm) blocking as a user switch after the first dialog
* This is to enable more browser-like behavior so that users who run third-party code will not be DOS'ed with alerts and confirms. This is already handled like this in most major browsers so this will greatly help these developers
This commit is contained in:
parent
a3d4d461a3
commit
795447f61a
7 changed files with 47 additions and 43 deletions
|
@ -6,6 +6,7 @@
|
|||
#define ATOM_BROWSER_ATOM_JAVASCRIPT_DIALOG_MANAGER_H_
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "content/public/browser/javascript_dialog_manager.h"
|
||||
|
||||
|
@ -37,9 +38,12 @@ class AtomJavaScriptDialogManager : public content::JavaScriptDialogManager {
|
|||
|
||||
private:
|
||||
static void OnMessageBoxCallback(const DialogClosedCallback& callback,
|
||||
const std::string& origin,
|
||||
std::map<std::string, int>* origins_,
|
||||
int code,
|
||||
bool checkbox_checked);
|
||||
api::WebContents* api_web_contents_;
|
||||
std::map<std::string, int> origin_counts_;
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue