OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/views/download/download_shelf_view.h" | 5 #include "chrome/browser/ui/views/download/download_shelf_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 if (download_views_[i]->HasFocus()) { | 167 if (download_views_[i]->HasFocus()) { |
168 gfx::Rect r = GetFocusRectBounds(download_views_[i]); | 168 gfx::Rect r = GetFocusRectBounds(download_views_[i]); |
169 r.Inset(0, 0, 0, 1); | 169 r.Inset(0, 0, 0, 1); |
170 canvas->DrawFocusRect(r); | 170 canvas->DrawFocusRect(r); |
171 break; | 171 break; |
172 } | 172 } |
173 } | 173 } |
174 } | 174 } |
175 | 175 |
176 void DownloadShelfView::OnPaintBorder(gfx::Canvas* canvas) { | 176 void DownloadShelfView::OnPaintBorder(gfx::Canvas* canvas) { |
177 canvas->FillRect(kBorderColor, gfx::Rect(0, 0, width(), 1)); | 177 canvas->FillRect(gfx::Rect(0, 0, width(), 1), kBorderColor); |
178 } | 178 } |
179 | 179 |
180 void DownloadShelfView::OpenedDownload(DownloadItemView* view) { | 180 void DownloadShelfView::OpenedDownload(DownloadItemView* view) { |
181 if (CanAutoClose()) | 181 if (CanAutoClose()) |
182 mouse_watcher_.Start(); | 182 mouse_watcher_.Start(); |
183 } | 183 } |
184 | 184 |
185 gfx::Size DownloadShelfView::GetPreferredSize() { | 185 gfx::Size DownloadShelfView::GetPreferredSize() { |
186 gfx::Size prefsize(kRightPadding + kLeftPadding + kCloseAndLinkPadding, 0); | 186 gfx::Size prefsize(kRightPadding + kLeftPadding + kCloseAndLinkPadding, 0); |
187 AdjustSize(close_button_, &prefsize); | 187 AdjustSize(close_button_, &prefsize); |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 const DownloadItemView* download_item_view) { | 466 const DownloadItemView* download_item_view) { |
467 gfx::Rect bounds = download_item_view->bounds(); | 467 gfx::Rect bounds = download_item_view->bounds(); |
468 | 468 |
469 #if defined(TOOLKIT_VIEWS) | 469 #if defined(TOOLKIT_VIEWS) |
470 bounds.set_height(bounds.height() - 1); | 470 bounds.set_height(bounds.height() - 1); |
471 bounds.Offset(0, 3); | 471 bounds.Offset(0, 3); |
472 #endif | 472 #endif |
473 | 473 |
474 return bounds; | 474 return bounds; |
475 } | 475 } |
OLD | NEW |