]> khamidou — GitHub mirrors - electron.git/commitdiff
Emit WindowCloseCancelled message when close is cancelled by user code.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 26 Jun 2013 07:35:10 +0000 (15:35 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 26 Jun 2013 09:50:50 +0000 (17:50 +0800)
browser/native_window.cc

index fe0b5d273fa6fa852f434af9092d37983821d9cd..71a2a060c95f1374f764850e001eea925b13851c 100644 (file)
@@ -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());