summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authormhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 21:14:31 +0000
committermhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 21:14:31 +0000
commitaec6ad64baed1efb092adcc53bf2a1473a584876 (patch)
tree1a27caff548e6602d26208bac7e027a87dcca25e /chrome/browser/views
parent13e2edee5394104e38ea6713b57eb8e79e030e1c (diff)
downloadchromium_src-aec6ad64baed1efb092adcc53bf2a1473a584876.zip
chromium_src-aec6ad64baed1efb092adcc53bf2a1473a584876.tar.gz
chromium_src-aec6ad64baed1efb092adcc53bf2a1473a584876.tar.bz2
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
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/download_item_view.cc2
1 files changed, 2 insertions, 0 deletions
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);