Route window.open to "new-window" event
This commit is contained in:
parent
94818aef26
commit
389e56ce36
5 changed files with 41 additions and 24 deletions
|
@ -82,6 +82,15 @@ void Window::OnPageTitleUpdated(bool* prevent_default,
|
|||
*prevent_default = Emit("page-title-updated", args);
|
||||
}
|
||||
|
||||
void Window::WillCreatePopupWindow(const base::string16& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id) {
|
||||
base::ListValue args;
|
||||
args.AppendString(target_url.spec());
|
||||
args.AppendString(frame_name);
|
||||
Emit("new-window", args);
|
||||
}
|
||||
|
||||
void Window::WillCloseWindow(bool* prevent_default) {
|
||||
*prevent_default = Emit("close");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue