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

Unified Diff: chrome/browser/ui/views/simple_message_box_views.cc

Issue 8536026: Convert MessageBoxFlags class into an enum. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
Index: chrome/browser/ui/views/simple_message_box_views.cc
diff --git a/chrome/browser/ui/views/simple_message_box_views.cc b/chrome/browser/ui/views/simple_message_box_views.cc
index 6d9c1002fc1dfa1eacd9104fedca2f76c3c5c0e4..795cbd52ea7cab69282a88000bb48c04936869a9 100644
--- a/chrome/browser/ui/views/simple_message_box_views.cc
+++ b/chrome/browser/ui/views/simple_message_box_views.cc
@@ -41,8 +41,8 @@ bool ShowYesNoBox(gfx::NativeWindow parent,
void SimpleMessageBoxViews::ShowErrorBox(gfx::NativeWindow parent_window,
const string16& title,
const string16& message) {
- int dialog_flags = ui::MessageBoxFlags::kFlagHasMessage |
- ui::MessageBoxFlags::kFlagHasOKButton;
+ int dialog_flags = ui::MESSAGE_BOX_HAS_MESSAGE |
tfarina 2011/11/12 12:40:22 this should be ui::MessageBoxFlags::kIsJavascriptA
+ ui::MESSAGE_BOX_HAS_OK_BUTTON;
// This is a reference counted object so it is given an initial increment
// in the constructor with a corresponding decrement in DeleteDelegate().
@@ -52,7 +52,7 @@ void SimpleMessageBoxViews::ShowErrorBox(gfx::NativeWindow parent_window,
bool SimpleMessageBoxViews::ShowYesNoBox(gfx::NativeWindow parent_window,
const string16& title,
const string16& message) {
- int dialog_flags = ui::MessageBoxFlags::kIsConfirmMessageBox;
+ int dialog_flags = ui::MESSAGE_BOX_IS_CONFIRM_DIALOG;
// This is a reference counted object so it is given an initial increment
// in the constructor plus an extra one below to ensure the dialog persists
@@ -86,9 +86,9 @@ bool SimpleMessageBoxViews::Accept() {
int SimpleMessageBoxViews::GetDialogButtons() const {
// NOTE: It seems unsafe to assume that the flags for OK/cancel will always
// have the same value as the button ids.
- return (dialog_flags_ & ui::MessageBoxFlags::kFlagHasOKButton
+ return (dialog_flags_ & ui::MESSAGE_BOX_HAS_OK_BUTTON
? ui::DIALOG_BUTTON_OK : 0) |
- (dialog_flags_ & ui::MessageBoxFlags::kFlagHasCancelButton
+ (dialog_flags_ & ui::MESSAGE_BOX_HAS_CANCEL_BUTTON
? ui::DIALOG_BUTTON_CANCEL : 0);
}

Powered by Google App Engine
This is Rietveld 408576698