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

Unified Diff: ui/views/button_drag_utils.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/button_drag_utils.cc
diff --git a/ui/views/button_drag_utils.cc b/ui/views/button_drag_utils.cc
index cca89ea1eb217f05be760057d0ee7f418cd1f55b..4460404920abc9f3ea680bc59f1cb30d50ab29f3 100644
--- a/ui/views/button_drag_utils.cc
+++ b/ui/views/button_drag_utils.cc
@@ -43,9 +43,8 @@ void SetDragImage(const GURL& url,
ui::OSExchangeData* data,
views::Widget* widget) {
// Create a button to render the drag image for us.
- views::LabelButton button(NULL,
- title.empty() ? base::UTF8ToUTF16(url.spec())
- : title);
+ views::LabelButton button(nullptr);
+ button.Init(title.empty() ? base::UTF8ToUTF16(url.spec()) : title);
button.SetTextSubpixelRenderingEnabled(false);
const ui::NativeTheme* theme =
widget ? widget->GetNativeTheme() : ui::NativeTheme::instance();

Powered by Google App Engine
This is Rietveld 408576698