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

Unified Diff: ui/views/window/dialog_client_view.cc

Issue 1216673005: views::LabelButton should not call virtual methods from its constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150703-Views-ButtonBorderRefactor
Patch Set: selfnits Created 5 years, 5 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: ui/views/window/dialog_client_view.cc
diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
index 8903650d45038bde4601fb5460873bc486ae79c5..d0b9fe39882218300eef88a7409b0a8766ce94ad 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -390,11 +390,11 @@ LabelButton* DialogClientView::CreateDialogButton(ui::DialogButton type) {
if (GetDialogDelegate()->UseNewStyleForThisDialog() &&
GetDialogDelegate()->GetDefaultDialogButton() == type &&
GetDialogDelegate()->ShouldDefaultButtonBeBlue()) {
- button = new BlueButton(this, title);
+ button = new BlueButton(this);
} else {
- button = new LabelButton(this, title);
- button->SetStyle(Button::STYLE_BUTTON);
+ button = new LabelButton(this);
}
+ button->InitAsButton(title);
button->SetFocusable(true);
const int kDialogMinButtonWidth = 75;

Powered by Google App Engine
This is Rietveld 408576698