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

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

Issue 10068025: views: Initialize message_box_title_ in the initalizer list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
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 a67e6539f148b1f363af1b155c346506f36abd3e..746866bbdefd0bad686a34924885bc1b37693e91 100644
--- a/chrome/browser/ui/views/simple_message_box_views.cc
+++ b/chrome/browser/ui/views/simple_message_box_views.cc
@@ -80,7 +80,7 @@ bool SimpleMessageBoxViews::ShowYesNoBox(gfx::NativeWindow parent_window,
// SimpleMessageBoxViews, private:
int SimpleMessageBoxViews::GetDialogButtons() const {
- if (type_ == DIALOG_ERROR)
+ if (dialog_type_ == DIALOG_ERROR)
return ui::DIALOG_BUTTON_OK;
return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL;
}
@@ -92,17 +92,17 @@ string16 SimpleMessageBoxViews::GetDialogButtonLabel(
}
bool SimpleMessageBoxViews::Cancel() {
- disposition_ = DISPOSITION_CANCEL;
+ disposition_type_ = DISPOSITION_CANCEL;
return true;
}
bool SimpleMessageBoxViews::Accept() {
- disposition_ = DISPOSITION_OK;
+ disposition_type_ = DISPOSITION_OK;
return true;
}
string16 SimpleMessageBoxViews::GetWindowTitle() const {
- return message_box_title_;
+ return window_title_;
}
void SimpleMessageBoxViews::DeleteDelegate() {
@@ -126,16 +126,14 @@ const views::Widget* SimpleMessageBoxViews::GetWidget() const {
}
SimpleMessageBoxViews::SimpleMessageBoxViews(gfx::NativeWindow parent_window,
- DialogType type,
+ DialogType dialog_type,
const string16& title,
const string16& message)
- : type_(type),
- disposition_(DISPOSITION_UNKNOWN) {
- message_box_title_ = title;
+ : dialog_type_(dialog_type),
+ disposition_type_(DISPOSITION_UNKNOWN),
+ window_title_(title) {
message_box_view_ = new views::MessageBoxView(
Peter Kasting 2012/04/13 09:12:32 Nit: Why not init this in the initializer list too
- views::MessageBoxView::NO_OPTIONS,
- message,
- string16());
+ views::MessageBoxView::NO_OPTIONS, message, string16());
views::Widget::CreateWindowWithParent(this, parent_window)->Show();
// Add reference to be released in DeleteDelegate().
@@ -152,5 +150,5 @@ bool SimpleMessageBoxViews::Dispatch(const base::NativeEvent& event) {
#elif defined(USE_AURA)
aura::Env::GetInstance()->GetDispatcher()->Dispatch(event);
#endif
- return disposition_ == DISPOSITION_UNKNOWN;
+ return disposition_type_ == DISPOSITION_UNKNOWN;
}

Powered by Google App Engine
This is Rietveld 408576698