From 411e1a368544d71ac53b115b776f595b8b252fb6 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 26 Jun 2013 15:35:10 +0800 Subject: [PATCH] Emit WindowCloseCancelled message when close is cancelled by user code. --- browser/native_window.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser/native_window.cc b/browser/native_window.cc index fe0b5d273fa6..71a2a060c95f 100644 --- a/browser/native_window.cc +++ b/browser/native_window.cc @@ -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());