Prevent creating popup window from inside WebContents

This commit is contained in:
Cheng Zhao 2014-10-27 16:56:28 +08:00
parent cf4c2d02f3
commit fb864a8f23
3 changed files with 32 additions and 0 deletions

View file

@ -7,6 +7,9 @@
#include <string>
#include "base/strings/string16.h"
#include "url/gurl.h"
namespace atom {
class NativeWindowObserver {
@ -17,6 +20,11 @@ class NativeWindowObserver {
virtual void OnPageTitleUpdated(bool* prevent_default,
const std::string& title) {}
// Called when the web page in window wants to create a popup window.
virtual void WillCreatePopupWindow(const base::string16& frame_name,
const GURL& target_url,
const std::string& partition_id) {}
// Called when the window is gonna closed.
virtual void WillCloseWindow(bool* prevent_default) {}