Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Unified Diff: chrome/browser/cocoa/download_shelf_mac.mm

Issue 150216: Move download item to its own view and a xib, paving the way for a custom dow... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: minor Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/download_shelf_mac.mm
===================================================================
--- chrome/browser/cocoa/download_shelf_mac.mm (revision 19730)
+++ chrome/browser/cocoa/download_shelf_mac.mm (working copy)
@@ -8,24 +8,6 @@
#include "chrome/browser/cocoa/download_item_mac.h"
#include "chrome/browser/download/download_item_model.h"
-namespace {
-
-// TODO(thakis): These are all temporary until there's a download item view
-
-// Border padding of a download item
-const int kDownloadItemBorderPadding = 4;
-
-// Width of a download item
-const int kDownloadItemWidth = 200;
-
-// Height of a download item
-const int kDownloadItemHeight = 32;
-
-// Horizontal padding between two download items
-const int kDownloadItemPadding = 10;
-
-} // namespace
-
DownloadShelfMac::DownloadShelfMac(Browser* browser,
DownloadShelfController* controller)
: DownloadShelf(browser),
@@ -34,20 +16,7 @@
}
void DownloadShelfMac::AddDownload(BaseDownloadItemModel* download_model) {
-
- // TODO(thakis): we need to delete these at some point. There's no explicit
- // mass delete on windows, figure out where they do it.
-
- // TODO(thakis): This should just forward to the controller.
-
- // TODO(thakis): RTL support?
- int startX = kDownloadItemBorderPadding +
- (kDownloadItemWidth + kDownloadItemPadding) * download_items_.size();
- download_items_.push_back(new DownloadItemMac(download_model,
- NSMakeRect(startX, kDownloadItemBorderPadding,
- kDownloadItemWidth, kDownloadItemHeight),
- shelf_controller_));
-
+ [shelf_controller_ addDownloadItem:download_model];
Show();
}

Powered by Google App Engine
This is Rietveld 408576698