summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-13 19:50:21 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-13 19:50:21 +0000
commit335bd0850ccdffc752cf2f6931c3ef007b6d547b (patch)
treea39c09c8b43af436c0902b4ea71fc68c2565acd5
parentebd57a9c99fee48e832fdc8d0d2cb33563a64f8e (diff)
downloadchromium_src-335bd0850ccdffc752cf2f6931c3ef007b6d547b.zip
chromium_src-335bd0850ccdffc752cf2f6931c3ef007b6d547b.tar.gz
chromium_src-335bd0850ccdffc752cf2f6931c3ef007b6d547b.tar.bz2
views: Initialize message_box_title_ in the initalizer list.
R=pkasting@chromium.org Review URL: https://chromiumcodereview.appspot.com/10068025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132247 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/simple_message_box_views.cc18
-rw-r--r--chrome/browser/ui/views/simple_message_box_views.h8
2 files changed, 12 insertions, 14 deletions
diff --git a/chrome/browser/ui/views/simple_message_box_views.cc b/chrome/browser/ui/views/simple_message_box_views.cc
index a67e653..4b47a61 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;
}
@@ -102,7 +102,7 @@ bool SimpleMessageBoxViews::Accept() {
}
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;
- message_box_view_ = new views::MessageBoxView(
- views::MessageBoxView::NO_OPTIONS,
- message,
- string16());
+ : dialog_type_(dialog_type),
+ disposition_(DISPOSITION_UNKNOWN),
+ window_title_(title),
+ message_box_view_(new views::MessageBoxView(
+ views::MessageBoxView::NO_OPTIONS, message, string16())) {
views::Widget::CreateWindowWithParent(this, parent_window)->Show();
// Add reference to be released in DeleteDelegate().
diff --git a/chrome/browser/ui/views/simple_message_box_views.h b/chrome/browser/ui/views/simple_message_box_views.h
index af21a5a..ccbbe06 100644
--- a/chrome/browser/ui/views/simple_message_box_views.h
+++ b/chrome/browser/ui/views/simple_message_box_views.h
@@ -61,7 +61,7 @@ class SimpleMessageBoxViews : public views::DialogDelegate,
virtual const views::Widget* GetWidget() const OVERRIDE;
SimpleMessageBoxViews(gfx::NativeWindow parent_window,
- DialogType type,
+ DialogType dialog_type,
const string16& title,
const string16& message);
virtual ~SimpleMessageBoxViews();
@@ -71,10 +71,10 @@ class SimpleMessageBoxViews : public views::DialogDelegate,
// if the message is such that the menu should be closed.
virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
- const DialogType type_;
- string16 message_box_title_;
- views::MessageBoxView* message_box_view_;
+ const DialogType dialog_type_;
DispositionType disposition_;
+ const string16 window_title_;
+ views::MessageBoxView* message_box_view_;
DISALLOW_COPY_AND_ASSIGN(SimpleMessageBoxViews);
};