mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Emit WindowCloseCancelled message when close is cancelled by user code.
This commit is contained in:
@@ -151,8 +151,10 @@ void NativeWindow::CloseWebContents() {
|
||||
FOR_EACH_OBSERVER(NativeWindowObserver,
|
||||
observers_,
|
||||
WillCloseWindow(&prevent_default));
|
||||
if (prevent_default)
|
||||
if (prevent_default) {
|
||||
WindowList::WindowCloseCancelled(this);
|
||||
return;
|
||||
}
|
||||
|
||||
content::WebContents* web_contents(GetWebContents());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user