| Index: chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
|
| diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
|
| index d2711dcdaeb19f080e298bd4718923096bcd0e7b..f0671793cbd5dfed959054cb6af0905ffb5946f7 100644
|
| --- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
|
| +++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
|
| @@ -25,8 +25,7 @@ TabModalConfirmDialogDelegate::~TabModalConfirmDialogDelegate() {
|
| void TabModalConfirmDialogDelegate::Cancel() {
|
| if (closing_)
|
| return;
|
| - // Make sure we won't do anything when |Cancel()| or |Accept()| is called
|
| - // again.
|
| + // Make sure we won't do anything when another action occurs.
|
| closing_ = true;
|
| OnCanceled();
|
| CloseDialog();
|
| @@ -35,8 +34,7 @@ void TabModalConfirmDialogDelegate::Cancel() {
|
| void TabModalConfirmDialogDelegate::Accept() {
|
| if (closing_)
|
| return;
|
| - // Make sure we won't do anything when |Cancel()| or |Accept()| is called
|
| - // again.
|
| + // Make sure we won't do anything when another action occurs.
|
| closing_ = true;
|
| OnAccepted();
|
| CloseDialog();
|
| @@ -52,6 +50,15 @@ void TabModalConfirmDialogDelegate::LinkClicked(
|
| CloseDialog();
|
| }
|
|
|
| +void TabModalConfirmDialogDelegate::Close() {
|
| + if (closing_)
|
| + return;
|
| + // Make sure we won't do anything when another action occurs.
|
| + closing_ = true;
|
| + OnClosed();
|
| + CloseDialog();
|
| +}
|
| +
|
| gfx::Image* TabModalConfirmDialogDelegate::GetIcon() {
|
| return NULL;
|
| }
|
| @@ -86,6 +93,9 @@ void TabModalConfirmDialogDelegate::OnLinkClicked(
|
| WindowOpenDisposition disposition) {
|
| }
|
|
|
| +void TabModalConfirmDialogDelegate::OnClosed() {
|
| +}
|
| +
|
| void TabModalConfirmDialogDelegate::CloseDialog() {
|
| if (operations_delegate_)
|
| operations_delegate_->CloseDialog();
|
|
|