summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/bookmark_bar_view.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 17:35:00 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 17:35:00 +0000
commitf0ea49bb8d3280a52121666d14cc01ae1e0991e5 (patch)
treeaee9899d9eed86276a704893cad922a4650cbdf9 /chrome/browser/views/bookmark_bar_view.cc
parent41d3846d2f324a140e5e841bad5f53e156b40d15 (diff)
downloadchromium_src-f0ea49bb8d3280a52121666d14cc01ae1e0991e5.zip
chromium_src-f0ea49bb8d3280a52121666d14cc01ae1e0991e5.tar.gz
chromium_src-f0ea49bb8d3280a52121666d14cc01ae1e0991e5.tar.bz2
Misc. clean up: Rewrap, simplify. Refactored two separate files' calls of TabStrip::SetBackgroundOffset() into a single call in a different place.
BUG=none TEST=none Review URL: http://codereview.chromium.org/3107012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56377 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_bar_view.cc')
-rw-r--r--chrome/browser/views/bookmark_bar_view.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 2ea1c66..67a4078 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -62,7 +62,7 @@ using views::View;
// How much we want the bookmark bar to overlap the toolbar when in its
// 'always shown' mode.
-static const double kToolbarOverlap = 4.0;
+static const int kToolbarOverlap = 4;
// Margins around the content.
static const int kTopMargin = 1;
@@ -395,10 +395,7 @@ BookmarkBarView::BookmarkBarView(Profile* profile, Browser* browser)
Init();
SetProfile(profile);
- if (IsAlwaysShown())
- size_animation_->Reset(1);
- else
- size_animation_->Reset(0);
+ size_animation_->Reset(IsAlwaysShown() ? 1 : 0);
}
BookmarkBarView::~BookmarkBarView() {
@@ -753,8 +750,10 @@ bool BookmarkBarView::OnNewTabPage() const {
}
int BookmarkBarView::GetToolbarOverlap(bool return_max) {
- return static_cast<int>(kToolbarOverlap *
- (return_max ? 1.0 : size_animation_->GetCurrentValue()));
+ if (return_max)
+ return kToolbarOverlap;
+ return static_cast<int>(static_cast<double>(kToolbarOverlap) *
+ size_animation_->GetCurrentValue());
}
void BookmarkBarView::AnimationProgressed(const Animation* animation) {