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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Further renaming 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
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index f035404bac423a5c8772eb589789cc72cf9a5f17..3940eb5180bc58de5d3ccdd94d63ad1d030d7c75 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -238,7 +238,7 @@ LocationBarView::~LocationBarView() {
void LocationBarView::InitTouchableLocationBarChildView(views::View* view) {
int horizontal_padding = GetBuiltInHorizontalPaddingForChildViews();
if (horizontal_padding != 0) {
- view->set_border(views::Border::CreateEmptyBorder(
+ view->SetBorder(views::Border::CreateEmptyBorder(
3, horizontal_padding, 3, horizontal_padding));
}
}
@@ -389,8 +389,8 @@ void LocationBarView::Init() {
search_button_->SetStyle(views::Button::STYLE_BUTTON);
search_button_->SetFocusable(false);
search_button_->set_min_size(gfx::Size());
- views::LabelButtonBorder* search_button_border =
- new views::LabelButtonBorder(search_button_->style());
+ scoped_ptr<views::LabelButtonBorder> search_button_border(
+ new views::LabelButtonBorder(search_button_->style()));
search_button_border->set_insets(gfx::Insets());
const int kSearchButtonNormalImages[] = IMAGE_GRID(IDR_OMNIBOX_SEARCH_BUTTON);
search_button_border->SetPainter(
@@ -411,7 +411,7 @@ void LocationBarView::Init() {
search_button_border->SetPainter(true, views::Button::STATE_HOVERED, NULL);
search_button_border->SetPainter(true, views::Button::STATE_PRESSED, NULL);
search_button_border->SetPainter(true, views::Button::STATE_DISABLED, NULL);
- search_button_->set_border(search_button_border);
+ search_button_->SetBorder(search_button_border.PassAs<views::Border>());
const int kSearchButtonWidth = 56;
search_button_->set_min_size(gfx::Size(kSearchButtonWidth, 0));
search_button_->SetVisible(false);
@@ -908,7 +908,7 @@ void LocationBarView::Layout() {
}
const gfx::Insets insets = omnibox_view_->GetInsets();
- omnibox_view_->set_border(views::Border::CreateEmptyBorder(
+ omnibox_view_->SetBorder(views::Border::CreateEmptyBorder(
insets.top(), insets.left(), insets.bottom(), omnibox_view_margin));
// Layout |ime_inline_autocomplete_view_| next to the user input.

Powered by Google App Engine
This is Rietveld 408576698