| Index: chrome/browser/tab_contents/tab_contents.cc
|
| diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
|
| index f8f93a423bdafc992913a07c4f16c42a53e70a4f..50cb78d71fd9e0b9264d83f15bd48e509ad0a25a 100644
|
| --- a/chrome/browser/tab_contents/tab_contents.cc
|
| +++ b/chrome/browser/tab_contents/tab_contents.cc
|
| @@ -841,6 +841,13 @@ void TabContents::HideContents() {
|
| WasHidden();
|
| }
|
|
|
| +bool TabContents::NeedToFireBeforeUnload() {
|
| + // TODO(creis): Should we fire even for interstitial pages?
|
| + return notify_disconnection() &&
|
| + !showing_interstitial_page() &&
|
| + !render_view_host()->SuddenTerminationAllowed();
|
| +}
|
| +
|
| void TabContents::OpenURL(const GURL& url, const GURL& referrer,
|
| WindowOpenDisposition disposition,
|
| PageTransition::Type transition) {
|
| @@ -2795,6 +2802,8 @@ void TabContents::RunJavaScriptMessage(
|
|
|
| void TabContents::RunBeforeUnloadConfirm(const std::wstring& message,
|
| IPC::Message* reply_msg) {
|
| + if (delegate())
|
| + delegate()->WillRunBeforeUnloadConfirm();
|
| if (delegate() && delegate()->ShouldSuppressDialogs()) {
|
| render_view_host()->JavaScriptMessageBoxClosed(reply_msg, true,
|
| std::wstring());
|
|
|