summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-24 16:39:58 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-24 16:39:58 +0000
commit52856c37b4d928a593a7fbdbb8171c5197795488 (patch)
treeea8ff91a6cd97a4c91c77f8602f6bdbb6144a2ba /chrome
parent1e6d82afa2241e27d0134a2fec2f9d230979bb01 (diff)
downloadchromium_src-52856c37b4d928a593a7fbdbb8171c5197795488.zip
chromium_src-52856c37b4d928a593a7fbdbb8171c5197795488.tar.gz
chromium_src-52856c37b4d928a593a7fbdbb8171c5197795488.tar.bz2
Fix infobar close button positioning. No-one appears to be using the close button method I removed, and it was wrong, anyway.
BUG=11238 TEST=Make sure that the plugin crashed infobar and save password infobar's close buttons are equivalently positioned. Review URL: http://codereview.chromium.org/146066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/infobars/infobars.cc8
-rw-r--r--chrome/browser/views/infobars/infobars.h4
2 files changed, 2 insertions, 10 deletions
diff --git a/chrome/browser/views/infobars/infobars.cc b/chrome/browser/views/infobars/infobars.cc
index 12fe42e..48f866d 100644
--- a/chrome/browser/views/infobars/infobars.cc
+++ b/chrome/browser/views/infobars/infobars.cc
@@ -143,7 +143,7 @@ gfx::Size InfoBar::GetPreferredSize() {
void InfoBar::Layout() {
gfx::Size button_ps = close_button_->GetPreferredSize();
- close_button_->SetBounds(width() - CloseButtonSpacing() - button_ps.width(),
+ close_button_->SetBounds(width() - kButtonSpacing - button_ps.width(),
OffsetY(this, button_ps), button_ps.width(),
button_ps.height());
}
@@ -162,17 +162,13 @@ void InfoBar::ViewHierarchyChanged(bool is_add, views::View* parent,
// InfoBar, protected: ---------------------------------------------------------
int InfoBar::GetAvailableWidth() const {
- return close_button_->x() - CloseButtonSpacing();
+ return close_button_->x() - kButtonSpacing;
}
void InfoBar::RemoveInfoBar() const {
container_->RemoveDelegate(delegate());
}
-int InfoBar::CloseButtonSpacing() const {
- return CenterY(close_button_->GetPreferredSize());
-}
-
// InfoBar, views::ButtonListener implementation: ------------------
void InfoBar::ButtonPressed(views::Button* sender) {
diff --git a/chrome/browser/views/infobars/infobars.h b/chrome/browser/views/infobars/infobars.h
index 4b468a8..b43d61d 100644
--- a/chrome/browser/views/infobars/infobars.h
+++ b/chrome/browser/views/infobars/infobars.h
@@ -74,10 +74,6 @@ class InfoBar : public views::View,
// (Will lead to this InfoBar being closed).
void RemoveInfoBar() const;
- // Returns the spacing required between the close button and any adjacent
- // control.
- int CloseButtonSpacing() const;
-
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender);