summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authorpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 00:52:18 +0000
committerpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 00:52:18 +0000
commite8a425bf301c3f27cc5344d94ad42e3fc89ed722 (patch)
tree8dd73fcfffd7286e6ceed6619957a805ab86adb3 /chrome/browser/download
parentf7e1635a57399c009c19bdc4621e8adcd82fbee7 (diff)
downloadchromium_src-e8a425bf301c3f27cc5344d94ad42e3fc89ed722.zip
chromium_src-e8a425bf301c3f27cc5344d94ad42e3fc89ed722.tar.gz
chromium_src-e8a425bf301c3f27cc5344d94ad42e3fc89ed722.tar.bz2
Enable opening downloads from the Mac download shelf.
Also added a stub for an unused method on Canvas in order to link. TEST=Selecting "Open" from the shelf menu will open a download BUG=15661 Review URL: http://codereview.chromium.org/150079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_shelf.cc11
1 files changed, 1 insertions, 10 deletions
diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc
index 0b468c4..1db9173 100644
--- a/chrome/browser/download/download_shelf.cc
+++ b/chrome/browser/download/download_shelf.cc
@@ -10,14 +10,11 @@
#include "chrome/browser/dom_ui/downloads_ui.h"
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/download/download_manager.h"
+#include "chrome/browser/download/download_util.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
-#if defined(OS_WIN) || defined(OS_LINUX)
-// TODO(port): port this for mac. See two uses below.
-#include "chrome/browser/download/download_util.h"
-#endif
// DownloadShelf ---------------------------------------------------------------
@@ -81,11 +78,7 @@ bool DownloadShelfContextMenu::IsItemCommandEnabled(int id) const {
case OPEN_WHEN_COMPLETE:
return download_->state() != DownloadItem::CANCELLED;
case ALWAYS_OPEN_TYPE:
-#if defined(OS_WIN) || defined(OS_LINUX)
return download_util::CanOpenDownload(download_);
-#else
- return false;
-#endif
case CANCEL:
return download_->state() == DownloadItem::IN_PROGRESS;
default:
@@ -99,9 +92,7 @@ void DownloadShelfContextMenu::ExecuteItemCommand(int id) {
download_->manager()->ShowDownloadInShell(download_);
break;
case OPEN_WHEN_COMPLETE:
-#if defined(OS_WIN) || defined(OS_LINUX)
download_util::OpenDownload(download_);
-#endif
break;
case ALWAYS_OPEN_TYPE: {
const FilePath::StringType extension =