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..2d865ba6a20b7e77c9261af0543982e3a087bc0a 100644 |
--- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc |
+++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc |
@@ -22,34 +22,45 @@ TabModalConfirmDialogDelegate::~TabModalConfirmDialogDelegate() { |
Cancel(); |
} |
-void TabModalConfirmDialogDelegate::Cancel() { |
+bool TabModalConfirmDialogDelegate::Cancel() { |
if (closing_) |
- return; |
- // Make sure we won't do anything when |Cancel()| or |Accept()| is called |
- // again. |
+ return false; |
+ // Make sure we won't do anything when another action occurs. |
closing_ = true; |
OnCanceled(); |
CloseDialog(); |
+ return true; |
} |
-void TabModalConfirmDialogDelegate::Accept() { |
+bool TabModalConfirmDialogDelegate::Accept() { |
if (closing_) |
- return; |
- // Make sure we won't do anything when |Cancel()| or |Accept()| is called |
- // again. |
+ return false; |
+ // Make sure we won't do anything when another action occurs. |
closing_ = true; |
OnAccepted(); |
CloseDialog(); |
+ return true; |
} |
-void TabModalConfirmDialogDelegate::LinkClicked( |
+bool TabModalConfirmDialogDelegate::LinkClicked( |
WindowOpenDisposition disposition) { |
if (closing_) |
- return; |
+ return false; |
// Make sure we won't do anything when another action occurs. |
closing_ = true; |
OnLinkClicked(disposition); |
CloseDialog(); |
+ return true; |
+} |
+ |
+bool TabModalConfirmDialogDelegate::Close() { |
+ if (closing_) |
+ return false; |
+ // Make sure we won't do anything when another action occurs. |
+ closing_ = true; |
+ OnClosed(); |
+ CloseDialog(); |
fdoray
2013/07/24 20:21:07
For Views, calling CloseDialog() in Cancel(), Acce
|
+ return true; |
} |
gfx::Image* TabModalConfirmDialogDelegate::GetIcon() { |
@@ -86,6 +97,9 @@ void TabModalConfirmDialogDelegate::OnLinkClicked( |
WindowOpenDisposition disposition) { |
} |
+void TabModalConfirmDialogDelegate::OnClosed() { |
+} |
+ |
void TabModalConfirmDialogDelegate::CloseDialog() { |
if (operations_delegate_) |
operations_delegate_->CloseDialog(); |