summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 03:24:02 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 03:24:02 +0000
commit9a3f0ac2899139ace97e399015259d028b4d5704 (patch)
treeb23a9d2986df7fe9fa59317ae7348abf6534d95d /chrome/browser
parent308b5e017464f310252b77dd52752de120aa98e7 (diff)
downloadchromium_src-9a3f0ac2899139ace97e399015259d028b4d5704.zip
chromium_src-9a3f0ac2899139ace97e399015259d028b4d5704.tar.gz
chromium_src-9a3f0ac2899139ace97e399015259d028b4d5704.tar.bz2
Make border and background setting and getting non-virtual and use the correct style. I was debugging in here and this was annoying me, since there is no reason for these functions to be virtual.
Review URL: http://codereview.chromium.org/10638 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5445 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/native_ui_contents.cc9
-rw-r--r--chrome/browser/views/blocked_popup_container.cc2
-rw-r--r--chrome/browser/views/download_shelf_view.cc2
-rw-r--r--chrome/browser/views/find_bar_view.cc4
-rw-r--r--chrome/browser/views/first_run_view_base.cc2
-rw-r--r--chrome/browser/views/info_bar_view.cc2
-rw-r--r--chrome/browser/views/location_bar_view.cc4
-rw-r--r--chrome/browser/views/options/advanced_contents_view.cc2
-rw-r--r--chrome/browser/views/options/cookies_view.cc2
-rw-r--r--chrome/browser/views/page_info_window.cc2
10 files changed, 16 insertions, 15 deletions
diff --git a/chrome/browser/native_ui_contents.cc b/chrome/browser/native_ui_contents.cc
index 1961e26d..840bb91 100644
--- a/chrome/browser/native_ui_contents.cc
+++ b/chrome/browser/native_ui_contents.cc
@@ -164,7 +164,7 @@ LRESULT NativeUIContents::OnCreate(LPCREATESTRUCT create_struct) {
// Install the focus manager so we get notified of Tab key events.
views::FocusManager::InstallFocusSubclass(GetHWND(), NULL);
- GetRootView()->SetBackground(new NativeUIBackground);
+ GetRootView()->set_background(new NativeUIBackground);
return 0;
}
@@ -497,10 +497,11 @@ SearchableUIContainer::SearchableUIContainer(
search_field_->SetController(this);
scroll_view_ = new views::ScrollView;
- scroll_view_->SetBackground(views::Background::CreateSolidBackground(kBackground));
+ scroll_view_->set_background(
+ views::Background::CreateSolidBackground(kBackground));
// Set background class so that native controls can get a color.
- SetBackground(new SearchableUIBackground(kBackground));
+ set_background(new SearchableUIBackground(kBackground));
throbber_ = new views::SmoothedThrobber(50);
@@ -516,7 +517,7 @@ SearchableUIContainer::SearchableUIContainer(
// Set a background color for the search button. If SearchableUIContainer
// provided a background, then the search button could inherit that instead.
- search_button_->SetBackground(new SearchableUIBackground(kBackground));
+ search_button_->set_background(new SearchableUIBackground(kBackground));
// For the first row (icon, title/text field, search button and throbber).
ColumnSet* column_set = layout->AddColumnSet(0);
diff --git a/chrome/browser/views/blocked_popup_container.cc b/chrome/browser/views/blocked_popup_container.cc
index b315976..6d9320e 100644
--- a/chrome/browser/views/blocked_popup_container.cc
+++ b/chrome/browser/views/blocked_popup_container.cc
@@ -136,7 +136,7 @@ BlockedPopupContainerView::BlockedPopupContainerView(
close_button_->SetListener(this, 0);
AddChildView(close_button_);
- SetBackground(views::Background::CreateStandardPanelBackground());
+ set_background(views::Background::CreateStandardPanelBackground());
UpdatePopupCountLabel();
}
diff --git a/chrome/browser/views/download_shelf_view.cc b/chrome/browser/views/download_shelf_view.cc
index a1538a4..4190d78 100644
--- a/chrome/browser/views/download_shelf_view.cc
+++ b/chrome/browser/views/download_shelf_view.cc
@@ -100,7 +100,7 @@ void DownloadShelfView::Init() {
rb.GetBitmapNamed(IDR_CLOSE_BAR_P));
close_button_->SetListener(this, 0);
AddChildView(close_button_);
- SetBackground(views::Background::CreateSolidBackground(kBackgroundColor));
+ set_background(views::Background::CreateSolidBackground(kBackgroundColor));
new_item_animation_.reset(new SlideAnimation(this));
new_item_animation_->SetSlideDuration(kNewItemAnimationDurationMs);
diff --git a/chrome/browser/views/find_bar_view.cc b/chrome/browser/views/find_bar_view.cc
index 2307895..a065c1b 100644
--- a/chrome/browser/views/find_bar_view.cc
+++ b/chrome/browser/views/find_bar_view.cc
@@ -175,7 +175,7 @@ void FindBarView::ResetMatchCount() {
}
void FindBarView::ResetMatchCountBackground() {
- match_count_text_->SetBackground(
+ match_count_text_->set_background(
views::Background::CreateSolidBackground(kBackgroundColorMatch));
match_count_text_->SetColor(kTextColorMatchCount);
}
@@ -201,7 +201,7 @@ void FindBarView::UpdateMatchCount(int number_of_matches,
if (find_text_->GetText().empty() || number_of_matches > 0) {
ResetMatchCountBackground();
} else {
- match_count_text_->SetBackground(
+ match_count_text_->set_background(
views::Background::CreateSolidBackground(kBackgroundColorNoMatch));
match_count_text_->SetColor(kTextColorNoMatch);
MessageBeep(MB_OK);
diff --git a/chrome/browser/views/first_run_view_base.cc b/chrome/browser/views/first_run_view_base.cc
index 4875580..c919939 100644
--- a/chrome/browser/views/first_run_view_base.cc
+++ b/chrome/browser/views/first_run_view_base.cc
@@ -79,7 +79,7 @@ void FirstRunViewBase::SetupControls() {
if (UILayoutIsRightToLeft())
background_image_->SetImage(rb.GetBitmapNamed(IDR_WIZARD_ICON_RTL));
- background_image_->SetBackground(bkg);
+ background_image_->set_background(bkg);
AddChildView(background_image_);
// The first separator marks the end of the image.
diff --git a/chrome/browser/views/info_bar_view.cc b/chrome/browser/views/info_bar_view.cc
index 255e528..116a00b 100644
--- a/chrome/browser/views/info_bar_view.cc
+++ b/chrome/browser/views/info_bar_view.cc
@@ -131,7 +131,7 @@ void InfoBarView::ViewHierarchyChanged(bool is_add, View *parent,
}
void InfoBarView::Init() {
- SetBackground(
+ set_background(
views::Background::CreateVerticalGradientBackground(
kBackgroundColorTop, kBackgroundColorBottom));
}
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index 32b1d79..c28974f 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -610,10 +610,10 @@ LocationBarView::SelectedKeywordView::SelectedKeywordView(Profile* profile)
partial_label_.SetParentOwned(false);
full_label_.SetVisible(false);
partial_label_.SetVisible(false);
- full_label_.SetBorder(
+ full_label_.set_border(
views::Border::CreateEmptyBorder(kTopInset, kLeftInset, kBottomInset,
kRightInset));
- partial_label_.SetBorder(
+ partial_label_.set_border(
views::Border::CreateEmptyBorder(kTopInset, kLeftInset, kBottomInset,
kRightInset));
}
diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc
index af30d28..d50ce4e 100644
--- a/chrome/browser/views/options/advanced_contents_view.cc
+++ b/chrome/browser/views/options/advanced_contents_view.cc
@@ -1187,7 +1187,7 @@ AdvancedScrollViewContainer::AdvancedScrollViewContainer(Profile* profile)
scroll_view_(new views::ScrollView) {
AddChildView(scroll_view_);
scroll_view_->SetContents(contents_view_);
- SetBackground(new ListBackground());
+ set_background(new ListBackground());
}
AdvancedScrollViewContainer::~AdvancedScrollViewContainer() {
diff --git a/chrome/browser/views/options/cookies_view.cc b/chrome/browser/views/options/cookies_view.cc
index c70d5b3..a4cc197 100644
--- a/chrome/browser/views/options/cookies_view.cc
+++ b/chrome/browser/views/options/cookies_view.cc
@@ -440,7 +440,7 @@ void CookieInfoView::Init() {
SkColor border_color = color_utils::GetSysSkColor(COLOR_3DSHADOW);
views::Border* border = views::Border::CreateSolidBorder(
kCookieInfoViewBorderSize, border_color);
- SetBorder(border);
+ set_border(border);
name_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_NAME_LABEL));
diff --git a/chrome/browser/views/page_info_window.cc b/chrome/browser/views/page_info_window.cc
index 591e61b..fdd32fb 100644
--- a/chrome/browser/views/page_info_window.cc
+++ b/chrome/browser/views/page_info_window.cc
@@ -523,7 +523,7 @@ void PageInfoWindow::Init(Profile* profile,
DWORD sys_color = ::GetSysColor(COLOR_3DFACE);
SkColor color = SkColorSetRGB(GetRValue(sys_color), GetGValue(sys_color),
GetBValue(sys_color));
- contents_->SetBackground(views::Background::CreateSolidBackground(color));
+ contents_->set_background(views::Background::CreateSolidBackground(color));
views::GridLayout* layout = new views::GridLayout(contents_);
contents_->SetLayoutManager(layout);