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

Unified Diff: ui/views/controls/button/blue_button.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/controls/button/blue_button.cc
diff --git a/ui/views/controls/button/blue_button.cc b/ui/views/controls/button/blue_button.cc
index 81855561699a0af4eeaa0ef0d0e872a7827bed6c..140d114c17a44b9cda954caceed7d9bdb6479600 100644
--- a/ui/views/controls/button/blue_button.cc
+++ b/ui/views/controls/button/blue_button.cc
@@ -16,11 +16,14 @@ namespace views {
// static
const char BlueButton::kViewClassName[] = "views/BlueButton";
-BlueButton::BlueButton(ButtonListener* listener, const base::string16& text)
- : LabelButton(listener, text) {
+BlueButton::BlueButton(ButtonListener* listener) : LabelButton(listener) {
// Inherit STYLE_BUTTON insets, minimum size, alignment, etc.
- SetStyle(STYLE_BUTTON);
- UpdateThemedBorder();
+ SetDefaultStyle(STYLE_BUTTON);
+}
+
+BlueButton::BlueButton(ButtonListener* listener, const base::string16& text)
+ : LabelButton(listener) {
+ InitAsButton(text);
sadrul 2015/07/08 05:59:11 This is going to call virtual functions from the c
tapted 2015/07/08 06:31:33 Yes. Unfortunately lots of things inherit from Blu
tapted 2015/07/09 00:53:48 Actually "lots" was an exaggeration :). There's ju
}
BlueButton::~BlueButton() {}

Powered by Google App Engine
This is Rietveld 408576698