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

Unified Diff: ui/views/controls/button/label_button.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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/controls/button/label_button.h ('k') | ui/views/controls/button/text_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index 95ec21411507d68c43697e238727b88ba6ed3034..23ffa956f5527ec8e29869ec96f7eeaa151743ee 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -159,7 +159,7 @@ void LabelButton::SetStyle(ButtonStyle style) {
ResetColorsFromNativeTheme();
- UpdateThemedBorder(new LabelButtonBorder(style_));
+ UpdateThemedBorder(scoped_ptr<Border>(new LabelButtonBorder(style_)));
// Invalidate the layout to pickup the new insets from the border.
InvalidateLayout();
@@ -339,15 +339,15 @@ void LabelButton::UpdateImage() {
image_->SetImage(GetImage(state()));
}
-void LabelButton::UpdateThemedBorder(LabelButtonBorder* label_button_border) {
+void LabelButton::UpdateThemedBorder(scoped_ptr<Border> label_button_border) {
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
views::LinuxUI* linux_ui = views::LinuxUI::instance();
if (linux_ui) {
- set_border(linux_ui->CreateNativeBorder(this, label_button_border));
+ SetBorder(linux_ui->CreateNativeBorder(this, label_button_border.Pass()));
} else
#endif
{
- set_border(label_button_border);
+ SetBorder(label_button_border.Pass());
}
}
« no previous file with comments | « ui/views/controls/button/label_button.h ('k') | ui/views/controls/button/text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698