Chromium Code Reviews| 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; |
| } |