diff options
author | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 23:02:08 +0000 |
---|---|---|
committer | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 23:02:08 +0000 |
commit | 8358105e6826be9bbb7ef2a43671d596aa492ba6 (patch) | |
tree | f3aa6026df83d2ab8befec964f6abb3bb4bde9d6 /chrome/browser/cocoa/download_shelf_mac.mm | |
parent | a796793059916e64b9c45191c1945868f4bff2a5 (diff) | |
download | chromium_src-8358105e6826be9bbb7ef2a43671d596aa492ba6.zip chromium_src-8358105e6826be9bbb7ef2a43671d596aa492ba6.tar.gz chromium_src-8358105e6826be9bbb7ef2a43671d596aa492ba6.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/cocoa/download_shelf_mac.mm')
-rw-r--r-- | chrome/browser/cocoa/download_shelf_mac.mm | 33 |
1 files changed, 1 insertions, 32 deletions
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(); } |