summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/download_shelf_view.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-17 22:25:33 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-17 22:25:33 +0000
commit6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7 (patch)
tree4ce1316dbfd179681bdff905a7d71f1b4cbb902c /chrome/browser/views/download_shelf_view.cc
parent4c45708be10906e3cdbe9d40d206cfd3fcbaf1c2 (diff)
downloadchromium_src-6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7.zip
chromium_src-6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7.tar.gz
chromium_src-6f3bb6ca5a2e423fc9dda71c164c7e8ae2a8eae7.tar.bz2
Rename legacy methods that were in CamelCase to unix_hacker.
Required going through and modifying some of the code to solve name clashes. Review URL: http://codereview.chromium.org/2945 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2337 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/download_shelf_view.cc')
-rw-r--r--chrome/browser/views/download_shelf_view.cc20
1 files changed, 9 insertions, 11 deletions
diff --git a/chrome/browser/views/download_shelf_view.cc b/chrome/browser/views/download_shelf_view.cc
index df6b7d5..4ab60d1 100644
--- a/chrome/browser/views/download_shelf_view.cc
+++ b/chrome/browser/views/download_shelf_view.cc
@@ -156,7 +156,7 @@ void DownloadShelfView::Paint(ChromeCanvas* canvas) {
}
void DownloadShelfView::PaintBorder(ChromeCanvas* canvas) {
- canvas->FillRectInt(kBorderColor, 0, 0, GetWidth(), 1);
+ canvas->FillRectInt(kBorderColor, 0, 0, width(), 1);
}
void DownloadShelfView::GetPreferredSize(CSize *out) {
@@ -203,8 +203,6 @@ void DownloadShelfView::AnimationEnded(const Animation *animation) {
}
void DownloadShelfView::Layout() {
- int width = GetWidth();
- int height = GetHeight();
CSize image_size;
arrow_image_->GetPreferredSize(&image_size);
CSize close_button_size;
@@ -212,21 +210,21 @@ void DownloadShelfView::Layout() {
CSize show_all_size;
show_all_view_->GetPreferredSize(&show_all_size);
int max_download_x =
- std::max<int>(0, width - kRightPadding - close_button_size.cx -
+ std::max<int>(0, width() - kRightPadding - close_button_size.cx -
kCloseAndLinkPadding - show_all_size.cx -
image_size.cx - kDownloadPadding);
int next_x = max_download_x + kDownloadPadding;
// Align vertically with show_all_view_.
- arrow_image_->SetBounds(next_x, CenterPosition(show_all_size.cy, height),
+ arrow_image_->SetBounds(next_x, CenterPosition(show_all_size.cy, height()),
image_size.cx, image_size.cy);
next_x += image_size.cx + kDownloadsTitlePadding;
show_all_view_->SetBounds(next_x,
- CenterPosition(show_all_size.cy, height),
+ CenterPosition(show_all_size.cy, height()),
show_all_size.cx,
show_all_size.cy);
next_x += show_all_size.cx + kCloseAndLinkPadding;
close_button_->SetBounds(next_x,
- CenterPosition(close_button_size.cy, height),
+ CenterPosition(close_button_size.cy, height()),
close_button_size.cx,
close_button_size.cy);
@@ -239,18 +237,18 @@ void DownloadShelfView::Layout() {
int x = next_x;
// Figure out width of item.
- int width = view_size.cx;
+ int item_width = view_size.cx;
if (new_item_animation_->IsAnimating() && ri == download_views_.rbegin()) {
- width = static_cast<int>(static_cast<double>(view_size.cx) *
+ item_width = static_cast<int>(static_cast<double>(view_size.cx) *
new_item_animation_->GetCurrentValue());
}
- next_x += (width + kDownloadPadding);
+ next_x += (item_width + kDownloadPadding);
// Make sure our item can be contained within the shelf.
if (next_x < max_download_x) {
(*ri)->SetVisible(true);
- (*ri)->SetBounds(x, CenterPosition(view_size.cy, height), width,
+ (*ri)->SetBounds(x, CenterPosition(view_size.cy, height()), item_width,
view_size.cy);
} else {
(*ri)->SetVisible(false);