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

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: self review 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
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/controls/button/blue_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5c2aed7922b38564c8795239e7a0de3dc0bfb2e3 100644
--- a/ui/views/button_drag_utils.cc
+++ b/ui/views/button_drag_utils.cc
@@ -43,9 +43,9 @@ 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.InitAsTextbutton(title.empty() ? base::UTF8ToUTF16(url.spec())
+ : title);
button.SetTextSubpixelRenderingEnabled(false);
const ui::NativeTheme* theme =
widget ? widget->GetNativeTheme() : ui::NativeTheme::instance();
« no previous file with comments | « ui/views/bubble/bubble_frame_view.cc ('k') | ui/views/controls/button/blue_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698