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/examples/button_example.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/corewm/tooltip_aura.cc ('k') | ui/views/examples/label_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/button_example.cc
diff --git a/ui/views/examples/button_example.cc b/ui/views/examples/button_example.cc
index 45b75d139e3d77ab1c9e751b338ec26d3bebbae9..c4becd379ec6c1595356cd5eba00565388613a54 100644
--- a/ui/views/examples/button_example.cc
+++ b/ui/views/examples/button_example.cc
@@ -126,10 +126,13 @@ void ButtonExample::TextButtonPressed(const ui::Event& event) {
text_button_->text().length() < 50 ? kLongText : kTextButton));
} else {
use_native_theme_border_ = !use_native_theme_border_;
- if (use_native_theme_border_)
- text_button_->set_border(new TextButtonNativeThemeBorder(text_button_));
- else
- text_button_->set_border(new TextButtonDefaultBorder());
+ if (use_native_theme_border_) {
+ text_button_->SetBorder(scoped_ptr<views::Border>(
+ new TextButtonNativeThemeBorder(text_button_)));
+ } else {
+ text_button_->SetBorder(
+ scoped_ptr<views::Border>(new TextButtonDefaultBorder()));
+ }
}
} else if (event.IsAltDown()) {
text_button_->SetIsDefault(!text_button_->is_default());
« no previous file with comments | « ui/views/corewm/tooltip_aura.cc ('k') | ui/views/examples/label_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698