From aec6ad64baed1efb092adcc53bf2a1473a584876 Mon Sep 17 00:00:00 2001 From: "mhm@chromium.org" Date: Tue, 4 Aug 2009 21:14:31 +0000 Subject: Include Pause/Resume in the context menu for the item in the download shelf. The pause and resume context item will only appear when the download is in progress. It will not show on the context menu if the download has been cancelled or completed. It is a toggle state, either pause or resume, not both. BUG=16929 (http://www.crbug.com/16929) TEST=Download a large file, right click pause, then resume. As well, download a small file, wait till finishes, right click, you will see no pause/resume. Review URL: http://codereview.chromium.org/159844 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22406 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/download_item_view.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'chrome/browser/views') diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc index 760585d..bbf053d 100644 --- a/chrome/browser/views/download_item_view.cc +++ b/chrome/browser/views/download_item_view.cc @@ -96,6 +96,8 @@ class DownloadShelfContextMenuWin : public DownloadShelfContextMenu, } context_menu->AppendMenuItem(ALWAYS_OPEN_TYPE, L"", views::Menu::CHECKBOX); context_menu->AppendSeparator(); + if (download_->state() == DownloadItem::IN_PROGRESS) + context_menu->AppendMenuItem(TOGGLE_PAUSE, L"", views::Menu::NORMAL); context_menu->AppendMenuItem(SHOW_IN_FOLDER, L"", views::Menu::NORMAL); context_menu->AppendSeparator(); context_menu->AppendMenuItem(REMOVE_ITEM, L"", views::Menu::NORMAL); -- cgit v1.1