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

Unified Diff: chrome/views/dialog_client_view.cc

Issue 28267: Fix 8200: Pressing Esc should cancel dialogs, not commit.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/dialog_client_view.cc
===================================================================
--- chrome/views/dialog_client_view.cc (revision 10608)
+++ chrome/views/dialog_client_view.cc (working copy)
@@ -67,7 +67,7 @@
Window* owner_;
const DialogDelegate::DialogButton type_;
- DISALLOW_EVIL_CONSTRUCTORS(DialogButton);
+ DISALLOW_COPY_AND_ASSIGN(DialogButton);
};
} // namespace
@@ -114,7 +114,7 @@
ok_button_->SetGroup(kButtonGroup);
if (is_default_button)
default_button_ = ok_button_;
- if (!cancel_button_)
+ if (!(buttons & DialogDelegate::DIALOGBUTTON_CANCEL))
ok_button_->AddAccelerator(Accelerator(VK_ESCAPE, false, false, false));
AddChildView(ok_button_);
}
@@ -273,7 +273,7 @@
// Listen for focus change events so we can update the default button.
DCHECK(focus_manager); // bug #1291225: crash reports seem to indicate it
// can be NULL.
- if (focus_manager)
+ if (focus_manager)
focus_manager->AddFocusChangeListener(this);
// The "extra view" must be created and installed after the contents view
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698