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

Unified Diff: chrome/browser/ui/views/js_modal_dialog_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/js_modal_dialog_views.cc
diff --git a/chrome/browser/ui/views/js_modal_dialog_views.cc b/chrome/browser/ui/views/js_modal_dialog_views.cc
index 683b845c24815d1393f7d6049c594bee60746073..cbc6601e04a3019ac400a9a07f628ecc8c0ed2a3 100644
--- a/chrome/browser/ui/views/js_modal_dialog_views.cc
+++ b/chrome/browser/ui/views/js_modal_dialog_views.cc
@@ -22,7 +22,7 @@ JSModalDialogViews::JSModalDialogViews(
JavaScriptAppModalDialog* parent)
: parent_(parent),
message_box_view_(new views::MessageBoxView(
- parent->dialog_flags() | ui::MessageBoxFlags::kAutoDetectAlignment,
+ parent->dialog_flags() | ui::MESSAGE_BOX_AUTO_DETECT_ALIGNMENT,
parent->message_text(),
parent->default_prompt_text())) {
DCHECK(message_box_view_);
@@ -70,10 +70,10 @@ void JSModalDialogViews::CancelAppModalDialog() {
// JSModalDialogViews, views::DialogDelegate implementation:
int JSModalDialogViews::GetDefaultDialogButton() const {
- if (parent_->dialog_flags() & ui::MessageBoxFlags::kFlagHasOKButton)
+ if (parent_->dialog_flags() & ui::MESSAGE_BOX_HAS_OK_BUTTON)
return ui::DIALOG_BUTTON_OK;
- if (parent_->dialog_flags() & ui::MessageBoxFlags::kFlagHasCancelButton)
+ if (parent_->dialog_flags() & ui::MESSAGE_BOX_HAS_CANCEL_BUTTON)
return ui::DIALOG_BUTTON_CANCEL;
return ui::DIALOG_BUTTON_NONE;
@@ -81,10 +81,10 @@ int JSModalDialogViews::GetDefaultDialogButton() const {
int JSModalDialogViews::GetDialogButtons() const {
int dialog_buttons = 0;
- if (parent_->dialog_flags() & ui::MessageBoxFlags::kFlagHasOKButton)
+ if (parent_->dialog_flags() & ui::MESSAGE_BOX_HAS_OK_BUTTON)
dialog_buttons = ui::DIALOG_BUTTON_OK;
- if (parent_->dialog_flags() & ui::MessageBoxFlags::kFlagHasCancelButton)
+ if (parent_->dialog_flags() & ui::MESSAGE_BOX_HAS_CANCEL_BUTTON)
dialog_buttons |= ui::DIALOG_BUTTON_CANCEL;
return dialog_buttons;

Powered by Google App Engine
This is Rietveld 408576698