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

Unified Diff: ui/views/controls/button/blue_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/color_chooser/color_chooser_view.cc ('k') | ui/views/controls/button/checkbox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4da321c1392ca03a3b5478f45988c35ae1ef0333..b5c0b15a2e172823b65feebdef1913e48514333f 100644
--- a/ui/views/controls/button/blue_button.cc
+++ b/ui/views/controls/button/blue_button.cc
@@ -30,7 +30,7 @@ BlueButton::BlueButton(ButtonListener* listener, const base::string16& text)
// Insets for splitting the images.
const gfx::Insets insets(5, 5, 5, 5);
- LabelButtonBorder* button_border = new LabelButtonBorder(style());
+ scoped_ptr<LabelButtonBorder> button_border(new LabelButtonBorder(style()));
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
button_border->SetPainter(false, STATE_NORMAL, Painter::CreateImagePainter(
*rb.GetImageSkiaNamed(IDR_BLUE_BUTTON_NORMAL), insets));
@@ -48,7 +48,7 @@ BlueButton::BlueButton(ButtonListener* listener, const base::string16& text)
*rb.GetImageSkiaNamed(IDR_BLUE_BUTTON_FOCUSED_PRESSED), insets));
button_border->SetPainter(true, STATE_DISABLED, Painter::CreateImagePainter(
*rb.GetImageSkiaNamed(IDR_BLUE_BUTTON_DISABLED), insets));
- set_border(button_border);
+ SetBorder(button_border.PassAs<Border>());
}
BlueButton::~BlueButton() {}
« no previous file with comments | « ui/views/color_chooser/color_chooser_view.cc ('k') | ui/views/controls/button/checkbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698