From 8358105e6826be9bbb7ef2a43671d596aa492ba6 Mon Sep 17 00:00:00 2001 From: "paul@chromium.org" <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Wed, 8 Jul 2009 23:02:08 +0000 Subject: The Mac version of the download shelf from the original CL by thakis: http://codereview.chromium.org/150216 Original description: Move download item to its own view and a xib, paving the way for a custom download item view. I didn't change the look of the download items yet. The context menu is now in the download item xib as well. BUG=14659,15098,14660 TEST=Download something. Everything should look like before (except for the smaller icon), but the context menu items should be disabled/enabled and checked/unchecked correctly. Review URL: http://codereview.chromium.org/149276 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20200 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/download_shelf_mac.mm | 33 +----------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'chrome/browser/cocoa/download_shelf_mac.mm') diff --git a/chrome/browser/cocoa/download_shelf_mac.mm b/chrome/browser/cocoa/download_shelf_mac.mm index 18fca59..f18377e 100644 --- a/chrome/browser/cocoa/download_shelf_mac.mm +++ b/chrome/browser/cocoa/download_shelf_mac.mm @@ -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 @@ DownloadShelfMac::DownloadShelfMac(Browser* browser, } 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(); } -- cgit v1.1