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

Unified Diff: ui/views/controls/message_box_view.cc

Issue 8553001: views: Add an Options enum to MessageBoxView control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adding an IPC_MESSAGE_EXPORT to line 30 of param_traits_macro.h makes it link in shared build Created 9 years 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 | « ui/views/controls/message_box_view.h ('k') | ui/views/examples/message_box_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/message_box_view.cc
diff --git a/ui/views/controls/message_box_view.cc b/ui/views/controls/message_box_view.cc
index 1c27627bb93a9a123da82243e6eb3bbbfaa6d1cd..6ce321766de541c7e62aa0e21aff4dfc433bceba 100644
--- a/ui/views/controls/message_box_view.cc
+++ b/ui/views/controls/message_box_view.cc
@@ -10,7 +10,6 @@
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
-#include "ui/base/message_box_flags.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
@@ -28,7 +27,7 @@ namespace views {
///////////////////////////////////////////////////////////////////////////////
// MessageBoxView, public:
-MessageBoxView::MessageBoxView(int dialog_flags,
+MessageBoxView::MessageBoxView(int options,
const string16& message,
const string16& default_prompt,
int message_width)
@@ -37,10 +36,10 @@ MessageBoxView::MessageBoxView(int dialog_flags,
icon_(NULL),
checkbox_(NULL),
message_width_(message_width) {
- Init(dialog_flags, default_prompt);
+ Init(options, default_prompt);
}
-MessageBoxView::MessageBoxView(int dialog_flags,
+MessageBoxView::MessageBoxView(int options,
const string16& message,
const string16& default_prompt)
: message_label_(new Label(message)),
@@ -48,7 +47,7 @@ MessageBoxView::MessageBoxView(int dialog_flags,
icon_(NULL),
checkbox_(NULL),
message_width_(kDefaultMessageWidth) {
- Init(dialog_flags, default_prompt);
+ Init(options, default_prompt);
}
MessageBoxView::~MessageBoxView() {}
@@ -125,11 +124,11 @@ bool MessageBoxView::AcceleratorPressed(const ui::Accelerator& accelerator) {
///////////////////////////////////////////////////////////////////////////////
// MessageBoxView, private:
-void MessageBoxView::Init(int dialog_flags,
+void MessageBoxView::Init(int options,
const string16& default_prompt) {
message_label_->SetMultiLine(true);
message_label_->SetAllowCharacterBreak(true);
- if (dialog_flags & ui::MessageBoxFlags::kAutoDetectAlignment) {
+ if (options & DETECT_ALIGNMENT) {
// Determine the alignment and directionality based on the first character
// with strong directionality.
base::i18n::TextDirection direction =
@@ -149,7 +148,7 @@ void MessageBoxView::Init(int dialog_flags,
message_label_->SetHorizontalAlignment(Label::ALIGN_LEFT);
}
- if (dialog_flags & ui::MessageBoxFlags::kFlagHasPromptField) {
+ if (options & HAS_PROMPT_FIELD) {
prompt_field_ = new Textfield;
prompt_field_->SetText(default_prompt);
}
« no previous file with comments | « ui/views/controls/message_box_view.h ('k') | ui/views/examples/message_box_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698