Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: ui/views/window/dialog_client_view.cc

Issue 10965052: Provide hook to abort dialog cancellation, disable cancellation during install. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Combined if clauses. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/web_intent_picker_views.cc ('k') | ui/views/window/dialog_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_client_view.cc
diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
index 1c289d3140ebfe7f36a03f6d80ab0430bd09d386..3401fbda2c5a5a0f67286cd7ebf8a22ee2811d1d 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -259,7 +259,8 @@ bool DialogClientView::CanClose() {
DialogDelegate* dd = GetDialogDelegate();
int buttons = dd->GetDialogButtons();
bool close = true;
- if (buttons & ui::DIALOG_BUTTON_CANCEL)
+ if ((buttons & ui::DIALOG_BUTTON_CANCEL) ||
+ (buttons == ui::DIALOG_BUTTON_NONE))
close = dd->Cancel();
else if (buttons & ui::DIALOG_BUTTON_OK)
close = dd->Accept(true);
« no previous file with comments | « chrome/browser/ui/views/web_intent_picker_views.cc ('k') | ui/views/window/dialog_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698