Index: ui/views/window/dialog_delegate.cc |
diff --git a/ui/views/window/dialog_delegate.cc b/ui/views/window/dialog_delegate.cc |
index 265dbbd021291f1002b0cae41a465d52b83c1a4d..fe8594afc02bbee042427138ead9124968f02f50 100644 |
--- a/ui/views/window/dialog_delegate.cc |
+++ b/ui/views/window/dialog_delegate.cc |
@@ -85,6 +85,15 @@ bool DialogDelegate::Accept() { |
return true; |
} |
+bool DialogDelegate::Close() { |
+ int buttons = GetDialogButtons(); |
+ if ((buttons & ui::DIALOG_BUTTON_CANCEL) || |
+ (buttons == ui::DIALOG_BUTTON_NONE)) { |
+ return Cancel(); |
+ } |
+ return Accept(true); |
+} |
+ |
base::string16 DialogDelegate::GetDialogLabel() const { |
return base::string16(); |
} |